From 167a05aabc229d48d62545ef218d8b0577e6e8f3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 4 May 2015 00:23:55 +0200 Subject: gnu: gcc-5.1: Add specific libvtv patch. * gnu/packages/patches/gcc-5.0-libvtv-runpath.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/gcc.scm (gcc-5.1)[source]: Use it. --- gnu/packages/patches/gcc-5.0-libvtv-runpath.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gnu/packages/patches/gcc-5.0-libvtv-runpath.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch b/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch new file mode 100644 index 0000000000..9a9bc5ca53 --- /dev/null +++ b/gnu/packages/patches/gcc-5.0-libvtv-runpath.patch @@ -0,0 +1,15 @@ +GCC 4.9 and later have libvtv and, just like libstdc++ (see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354), it doesn't +have $libdir in its RUNPATH, but it NEEDs libgcc_s. This patch +fixes that. + +--- gcc-5.1.0/libvtv/Makefile.in 2014-10-30 09:28:58.000000000 +0100 ++++ gcc-5.1.0/libvtv/Makefile.in 2015-04-30 09:51:04.161129705 +0200 +@@ -15,6 +15,7 @@ + + @SET_MAKE@ + ++libvtv_la_LDFLAGS = -Wl,-rpath=$(libdir) + + VPATH = @srcdir@ + pkgdatadir = $(datadir)/@PACKAGE@ -- cgit v1.2.3 From 80e2072a7506beaa3bf82a8c4e22e888b1b1111f Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sun, 3 May 2015 10:54:30 -0400 Subject: gnu: curl: Update to 7.42.1. * gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch, gnu/packages/patches/curl-support-capath-on-gnutls.patch: Remove files. * gnu-system.am (dist_patch_DATA): Remove them. * gnu/packages/curl.scm (curl): Update to 7.42.1. Remove patches. --- gnu-system.am | 2 - gnu/packages/curl.scm | 7 +- .../curl-support-capath-on-gnutls-conf.patch | 16 ---- .../patches/curl-support-capath-on-gnutls.patch | 102 --------------------- 4 files changed, 2 insertions(+), 125 deletions(-) delete mode 100644 gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch delete mode 100644 gnu/packages/patches/curl-support-capath-on-gnutls.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index c422d19f25..f6c9947923 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -404,8 +404,6 @@ dist_patch_DATA = \ gnu/packages/patches/cssc-missing-include.patch \ gnu/packages/patches/clucene-contribs-lib.patch \ gnu/packages/patches/cursynth-wave-rand.patch \ - gnu/packages/patches/curl-support-capath-on-gnutls.patch \ - gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch \ gnu/packages/patches/dbus-localstatedir.patch \ gnu/packages/patches/diffutils-gets-undeclared.patch \ gnu/packages/patches/dfu-programmer-fix-libusb.patch \ diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm index 526514b815..ab22645971 100644 --- a/gnu/packages/curl.scm +++ b/gnu/packages/curl.scm @@ -38,17 +38,14 @@ (define-public curl (package (name "curl") - (version "7.41.0") + (version "7.42.1") (source (origin (method url-fetch) (uri (string-append "http://curl.haxx.se/download/curl-" version ".tar.lzma")) (sha256 (base32 - "08n7vrhdfzziy3a7n93r7qjhzk8p26q464hxg8w9irdk3v60pi62")) - (patches - (list (search-patch "curl-support-capath-on-gnutls.patch") - (search-patch "curl-support-capath-on-gnutls-conf.patch"))))) + "0ircrhi4i9iviq0d9044rq288sdrww19d0ci6vmb4fh8nmm1jv1x")))) (build-system gnu-build-system) (inputs `(("gnutls" ,gnutls) ("gss" ,gss) diff --git a/gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch b/gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch deleted file mode 100644 index d2391d461d..0000000000 --- a/gnu/packages/patches/curl-support-capath-on-gnutls-conf.patch +++ /dev/null @@ -1,16 +0,0 @@ -This patch updates 'configure' as autoreconf would have done after -applying curl-support-capath-on-gnutls.patch. - ---- a/configure 2015-03-22 01:11:23.178743705 +0100 -+++ b/configure 2015-02-25 00:05:37.000000000 +0100 -@@ -23952,8 +24432,8 @@ - ca="$want_ca" - capath="no" - elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then -- if test "x$OPENSSL_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then -- as_fn_error $? "--with-ca-path only works with openSSL or PolarSSL" "$LINENO" 5 -+ if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then -+ as_fn_error $? "--with-ca-path only works with OpenSSL, GnuTLS or PolarSSL" "$LINENO" 5 - fi - capath="$want_capath" - ca="no" diff --git a/gnu/packages/patches/curl-support-capath-on-gnutls.patch b/gnu/packages/patches/curl-support-capath-on-gnutls.patch deleted file mode 100644 index d05dd021e8..0000000000 --- a/gnu/packages/patches/curl-support-capath-on-gnutls.patch +++ /dev/null @@ -1,102 +0,0 @@ -This patch adds support for CURLOPT_CAPATH to the GnuTLS backend. - -From 5a1614cecdd57cab8b4ae3e9bc19dfff5ba77e80 Mon Sep 17 00:00:00 2001 -From: Alessandro Ghedini -Date: Sun, 8 Mar 2015 20:11:06 +0100 -Subject: [PATCH] gtls: add support for CURLOPT_CAPATH - ---- - acinclude.m4 | 4 ++-- - docs/libcurl/opts/CURLOPT_CAPATH.3 | 5 ++--- - lib/vtls/gtls.c | 22 ++++++++++++++++++++++ - lib/vtls/gtls.h | 3 +++ - 4 files changed, 29 insertions(+), 5 deletions(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index 6ed7ffb..ca01869 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -2615,8 +2615,8 @@ AC_HELP_STRING([--without-ca-path], [Don't use a default CA path]), - capath="no" - elif test "x$want_capath" != "xno" -a "x$want_capath" != "xunset"; then - dnl --with-ca-path given -- if test "x$OPENSSL_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then -- AC_MSG_ERROR([--with-ca-path only works with openSSL or PolarSSL]) -+ if test "x$OPENSSL_ENABLED" != "x1" -a "x$GNUTLS_ENABLED" != "x1" -a "x$POLARSSL_ENABLED" != "x1"; then -+ AC_MSG_ERROR([--with-ca-path only works with OpenSSL, GnuTLS or PolarSSL]) - fi - capath="$want_capath" - ca="no" -diff --git a/docs/libcurl/opts/CURLOPT_CAPATH.3 b/docs/libcurl/opts/CURLOPT_CAPATH.3 -index 642953d..6695f9f 100644 ---- a/docs/libcurl/opts/CURLOPT_CAPATH.3 -+++ b/docs/libcurl/opts/CURLOPT_CAPATH.3 -@@ -43,9 +43,8 @@ All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc. - .SH EXAMPLE - TODO - .SH AVAILABILITY --This option is OpenSSL-specific and does nothing if libcurl is built to use --GnuTLS. NSS-powered libcurl provides the option only for backward --compatibility. -+This option is supported by the OpenSSL, GnuTLS and PolarSSL backends. The NSS -+backend provides the option only for backward compatibility. - .SH RETURN VALUE - Returns CURLE_OK if TLS enabled, and CURLE_UNKNOWN_OPTION if not, or - CURLE_OUT_OF_MEMORY if there was insufficient heap space. -diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c -index 05aef19..c792540 100644 ---- a/lib/vtls/gtls.c -+++ b/lib/vtls/gtls.c -@@ -97,6 +97,10 @@ static bool gtls_inited = FALSE; - # if (GNUTLS_VERSION_NUMBER >= 0x03020d) - # define HAS_OCSP - # endif -+ -+# if (GNUTLS_VERSION_NUMBER >= 0x030306) -+# define HAS_CAPATH -+# endif - #endif - - #ifdef HAS_OCSP -@@ -462,6 +466,24 @@ gtls_connect_step1(struct connectdata *conn, - rc, data->set.ssl.CAfile); - } - -+#ifdef HAS_CAPATH -+ if(data->set.ssl.CApath) { -+ /* set the trusted CA cert directory */ -+ rc = gnutls_certificate_set_x509_trust_dir(conn->ssl[sockindex].cred, -+ data->set.ssl.CApath, -+ GNUTLS_X509_FMT_PEM); -+ if(rc < 0) { -+ infof(data, "error reading ca cert file %s (%s)\n", -+ data->set.ssl.CAfile, gnutls_strerror(rc)); -+ if(data->set.ssl.verifypeer) -+ return CURLE_SSL_CACERT_BADFILE; -+ } -+ else -+ infof(data, "found %d certificates in %s\n", -+ rc, data->set.ssl.CApath); -+ } -+#endif -+ - if(data->set.ssl.CRLfile) { - /* set the CRL list file */ - rc = gnutls_certificate_set_x509_crl_file(conn->ssl[sockindex].cred, -diff --git a/lib/vtls/gtls.h b/lib/vtls/gtls.h -index c3867e5..af1cb5b 100644 ---- a/lib/vtls/gtls.h -+++ b/lib/vtls/gtls.h -@@ -54,6 +54,9 @@ bool Curl_gtls_cert_status_request(void); - /* Set the API backend definition to GnuTLS */ - #define CURL_SSL_BACKEND CURLSSLBACKEND_GNUTLS - -+/* this backend supports the CAPATH option */ -+#define have_curlssl_ca_path 1 -+ - /* API setup for GnuTLS */ - #define curlssl_init Curl_gtls_init - #define curlssl_cleanup Curl_gtls_cleanup --- -2.2.1 - -- cgit v1.2.3 From 401f9a8b15b126dc6b8a357474f89ae7cb915601 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 5 May 2015 00:38:59 -0500 Subject: gnu: fltk: Fix undefined symbol errors for shared libraries. * gnu/packages/patches/fltk-shared-lib-defines.patch: New patch. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/fltk.scm (source)[patches]: New field. --- gnu-system.am | 1 + gnu/packages/fltk.scm | 5 ++- gnu/packages/patches/fltk-shared-lib-defines.patch | 51 ++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/fltk-shared-lib-defines.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 0644a649a3..798188f7e7 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -418,6 +418,7 @@ dist_patch_DATA = \ gnu/packages/patches/findutils-absolute-paths.patch \ gnu/packages/patches/flashrom-use-libftdi1.patch \ gnu/packages/patches/flex-bison-tests.patch \ + gnu/packages/patches/fltk-shared-lib-defines.patch \ gnu/packages/patches/gawk-shell.patch \ gnu/packages/patches/gcc-arm-link-spec-fix.patch \ gnu/packages/patches/gcc-cross-environment-variables.patch \ diff --git a/gnu/packages/fltk.scm b/gnu/packages/fltk.scm index 1ac1f2507e..cbd9d00e8c 100644 --- a/gnu/packages/fltk.scm +++ b/gnu/packages/fltk.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington +;;; Copyright © 2015 Eric Bavier ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,6 +19,7 @@ (define-module (gnu packages fltk) #:use-module (guix licenses) + #:use-module (gnu packages) #:use-module (gnu packages xorg) #:use-module (gnu packages gl) #:use-module (guix packages) @@ -35,7 +37,8 @@ "/fltk-" version "-source.tar.gz")) (sha256 (base32 - "15qd7lkz5d5ynz70xhxhigpz3wns39v9xcf7ggkl0792syc8sfgq")))) + "15qd7lkz5d5ynz70xhxhigpz3wns39v9xcf7ggkl0792syc8sfgq")) + (patches (list (search-patch "fltk-shared-lib-defines.patch"))))) (build-system gnu-build-system) (inputs `(("libx11" ,libx11) diff --git a/gnu/packages/patches/fltk-shared-lib-defines.patch b/gnu/packages/patches/fltk-shared-lib-defines.patch new file mode 100644 index 0000000000..d36a50ff5e --- /dev/null +++ b/gnu/packages/patches/fltk-shared-lib-defines.patch @@ -0,0 +1,51 @@ +This patch from upstream revision 10588. + +--- fltk-1.3.3/src/Xutf8.h ++++ fltk-1.3.3/src/Xutf8.h +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + typedef struct { + int nb_font; +@@ -98,8 +99,8 @@ + XUtf8FontStruct *font_set, + unsigned int ucs); + +-int +-XGetUtf8FontAndGlyph( ++FL_EXPORT int ++fl_XGetUtf8FontAndGlyph( + XUtf8FontStruct *font_set, + unsigned int ucs, + XFontStruct **fnt, +--- fltk-1.3.3/src/gl_draw.cxx ++++ fltk-1.3.3/src/gl_draw.cxx +@@ -114,7 +114,7 @@ + for (int i = 0; i < 0x400; i++) { + XFontStruct *font = NULL; + unsigned short id; +- XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id); ++ fl_XGetUtf8FontAndGlyph(gl_fontsize->font, ii, &font, &id); + if (font) glXUseXFont(font->fid, id, 1, gl_fontsize->listbase+ii); + ii++; + } +--- fltk-1.3.3/src/xutf8/utf8Wrap.c ++++ fltk-1.3.3/src/xutf8/utf8Wrap.c +@@ -816,10 +816,10 @@ + /** get the X font and glyph ID of a UCS char **/ + /*****************************************************************************/ + int +-XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set, +- unsigned int ucs, +- XFontStruct **fnt, +- unsigned short *id) { ++fl_XGetUtf8FontAndGlyph(XUtf8FontStruct *font_set, ++ unsigned int ucs, ++ XFontStruct **fnt, ++ unsigned short *id) { + + /* int x; */ + int *encodings; /* encodings array */ -- cgit v1.2.3 From 76071c70fc82479b9ceaac7aa4d56ee9282a8a09 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 5 May 2015 20:21:38 -0500 Subject: gnu: hop: Remove use of patchelf. * gnu/packages/patches/hop-linker-flags.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/scheme.scm (source)[patches]: Use it. (arguments)[phases]: Remove patch-rpath phase. [modules, imported-modules]: Remove. (native-inputs): Remove field. --- gnu-system.am | 1 + gnu/packages/patches/hop-linker-flags.patch | 60 +++++++++++++++++++++++++++++ gnu/packages/scheme.scm | 37 ++++++------------ 3 files changed, 72 insertions(+), 26 deletions(-) create mode 100644 gnu/packages/patches/hop-linker-flags.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 9ffb76ee5d..2cbb854b89 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -449,6 +449,7 @@ dist_patch_DATA = \ gnu/packages/patches/guix-test-networking.patch \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ + gnu/packages/patches/hop-linker-flags.patch \ gnu/packages/patches/inetutils-syslogd.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ diff --git a/gnu/packages/patches/hop-linker-flags.patch b/gnu/packages/patches/hop-linker-flags.patch new file mode 100644 index 0000000000..f1f5dbfbd9 --- /dev/null +++ b/gnu/packages/patches/hop-linker-flags.patch @@ -0,0 +1,60 @@ +Make hop's link rules honor flags set by the --blflags configure argument. + +--- hop-2.4.0/src/Makefile 2015-05-05 19:41:04.800151036 -0500 ++++ hop-2.4.0/src/Makefile 2015-05-05 19:40:40.916150417 -0500 +@@ -69,10 +69,10 @@ + $(MAKE) link.$(LINK) DEST=$@ + + link.dynamic: +- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$(DEST)) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$(DEST)) + + link.static: +- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),-static-all-bigloo $(OBJECTS),-o,$(DEST)) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),-static-all-bigloo $(OBJECTS),-o,$(DEST)) + + link.library: + echo "***ERROR: link.library not currently supported!" +--- hop-2.4.0/hopc/Makefile 2013-01-30 07:17:59.000000000 -0600 ++++ hop-2.4.0/hopc/Makefile 2015-05-05 19:45:21.876157699 -0500 +@@ -62,7 +62,7 @@ + mkdir -p $@ + + $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS) +- @ $(call link,$(BIGLOO),$(BCFLAGS),,$(OBJECTS),-o,$@) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) + + $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib + $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s . +--- hop-2.4.0/hophz/Makefile 2013-01-30 07:17:59.000000000 -0600 ++++ hop-2.4.0/hophz/Makefile 2015-05-05 19:59:42.996180030 -0500 +@@ -16,9 +16,6 @@ + -include ../etc/Makefile.hopconfig + -include ../etc/Makefile.version + +-BLFLAGS = +-BLINKFLAGS = -suffix hop +- + #*---------------------------------------------------------------------*/ + #* Target and Project */ + #*---------------------------------------------------------------------*/ +@@ -72,7 +69,7 @@ + mkdir -p $@ + + $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS) +- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BLINKFLAGS),$(OBJECTS),-o,$@) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) + + $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib + @ $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s . +--- hop-2.4.0/hopsh/Makefile 2013-01-30 07:17:59.000000000 -0600 ++++ hop-2.4.0/hopsh/Makefile 2015-05-05 19:46:36.060159626 -0500 +@@ -60,7 +60,7 @@ + mkdir -p $@ + + $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS) +- @ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) ++ @ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@) + + $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib + @ $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s . diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index ae859791c1..f2f5287d7f 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -29,7 +29,6 @@ #:use-module (gnu packages databases) #:use-module (gnu packages emacs) #:use-module (gnu packages texinfo) - #:use-module (gnu packages elf) #:use-module (gnu packages base) #:use-module (gnu packages pkg-config) #:use-module (gnu packages avahi) @@ -235,39 +234,25 @@ Scheme and C programs and between Scheme and Java programs.") (sha256 (base32 "1v2r4ga58kk1sx0frn8qa8ccmjpic9csqzpk499wc95y9c4b1wy3")) - (patches (list (search-patch "hop-bigloo-4.0b.patch"))))) + (patches (list (search-patch "hop-bigloo-4.0b.patch") + (search-patch "hop-linker-flags.patch"))))) (build-system gnu-build-system) (arguments `(#:phases (alist-replace 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (zero? (system* "./configure" - (string-append "--prefix=" out))))) - (alist-cons-after - 'strip 'patch-rpath - (lambda* (#:key outputs #:allow-other-keys) - ;; Add $out/lib to the RPATH of every installed library and - ;; executable. Note that "patchelf --set-rpath" produces invalid - ;; binaries when used before stripping. - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - (with-directory-excursion out - (every (cut augment-rpath <> lib) - (append (find-files "bin" ".*") - (find-files "lib" "\\.so$")))))) - %standard-phases)) - #:tests? #f ; no test suite - #:modules ((guix build gnu-build-system) - (guix build utils) - (guix build rpath) - (srfi srfi-26) - (srfi srfi-1)) - #:imported-modules (,@%gnu-build-system-modules - (guix build rpath)))) - (native-inputs `(("patchelf" ,patchelf))) + (string-append "--prefix=" out) + (string-append "--blflags=" + ;; user flags completely override useful + ;; default flags, so repeat them here. + "-copt \\$(CPICFLAGS) -L\\$(BUILDLIBDIR) " + "-ldopt -Wl,-rpath," out "/lib"))))) + %standard-phases) + #:tests? #f)) ; no test suite (inputs `(("bigloo" ,bigloo) ("which" ,which))) (home-page "http://hop.inria.fr/") -- cgit v1.2.3 From 88b6b125baeb41908a40591d403bceb6a9aafb10 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 7 May 2015 12:19:33 -0400 Subject: gnu: serf: Apply upstream fixes. * gnu/packages/patches/serf-comment-style-fix.patch, gnu/packages/patches/serf-deflate-buckets-test-fix.patch: New file. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/web.scm (serf): Add patches. Remove 'remove-non-c89-comment' phase. --- gnu-system.am | 2 + gnu/packages/patches/serf-comment-style-fix.patch | 23 ++++++++ .../patches/serf-deflate-buckets-test-fix.patch | 69 ++++++++++++++++++++++ gnu/packages/web.scm | 12 ++-- 4 files changed, 98 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/serf-comment-style-fix.patch create mode 100644 gnu/packages/patches/serf-deflate-buckets-test-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 852d558ad3..b5b71abdb0 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -538,6 +538,8 @@ dist_patch_DATA = \ gnu/packages/patches/scheme48-tests.patch \ gnu/packages/patches/scotch-test-threading.patch \ gnu/packages/patches/sdl-libx11-1.6.patch \ + gnu/packages/patches/serf-comment-style-fix.patch \ + gnu/packages/patches/serf-deflate-buckets-test-fix.patch \ gnu/packages/patches/slim-session.patch \ gnu/packages/patches/slim-config.patch \ gnu/packages/patches/slim-sigusr1.patch \ diff --git a/gnu/packages/patches/serf-comment-style-fix.patch b/gnu/packages/patches/serf-comment-style-fix.patch new file mode 100644 index 0000000000..5d336fb3c8 --- /dev/null +++ b/gnu/packages/patches/serf-comment-style-fix.patch @@ -0,0 +1,23 @@ +r2443 | andreas.stieger@gmx.de | 2014-10-21 17:42:56 -0400 (Tue, 21 Oct 2014) | 7 lines + +Follow-up to r2419: Correct comment style + +* test/test_buckets.c + (deflate_compress): Correct comment style not supported by strict + compilers, fails on /branches/1.3.x + +Index: test/test_buckets.c +=================================================================== +--- test/test_buckets.c (revision 2442) ++++ test/test_buckets.c (revision 2443) +@@ -1323,9 +1323,9 @@ + + /* The largest buffer we should need is 0.1% larger than the + uncompressed data, + 12 bytes. This info comes from zlib.h. ++ buf_size = orig_len + (orig_len / 1000) + 12; + Note: This isn't sufficient when using Z_NO_FLUSH and extremely compressed + data. Use a buffer bigger than what we need. */ +-// buf_size = orig_len + (orig_len / 1000) + 12; + buf_size = 100000; + + write_buf = apr_palloc(pool, buf_size); diff --git a/gnu/packages/patches/serf-deflate-buckets-test-fix.patch b/gnu/packages/patches/serf-deflate-buckets-test-fix.patch new file mode 100644 index 0000000000..be8be1b1e8 --- /dev/null +++ b/gnu/packages/patches/serf-deflate-buckets-test-fix.patch @@ -0,0 +1,69 @@ +r2445 | chemodax | 2014-10-23 12:15:22 -0400 (Thu, 23 Oct 2014) | 6 lines + +Reduce memory usage by deflate buckets test. + +* test/test_buckets.c + (deflate_buckets): Add POOL argument and use it instead of tb->pool. + (test_deflate_buckets): Use iterpool for deflate_buckets() call. + +Index: test/test_buckets.c +=================================================================== +--- test/test_buckets.c (revision 2444) ++++ test/test_buckets.c (revision 2445) +@@ -1400,12 +1400,12 @@ + expected_len); + } + +-static void deflate_buckets(CuTest *tc, int nr_of_loops) ++static void deflate_buckets(CuTest *tc, int nr_of_loops, apr_pool_t *pool) + { + const char *msg = "12345678901234567890123456789012345678901234567890"; + + test_baton_t *tb = tc->testBaton; +- serf_bucket_alloc_t *alloc = serf_bucket_allocator_create(tb->pool, NULL, ++ serf_bucket_alloc_t *alloc = serf_bucket_allocator_create(pool, NULL, + NULL); + z_stream zdestr; + int i; +@@ -1424,8 +1424,8 @@ + { + serf_config_t *config; + +- serf_context_t *ctx = serf_context_create(tb->pool); +- /* status = */ serf__config_store_get_config(ctx, NULL, &config, tb->pool); ++ serf_context_t *ctx = serf_context_create(pool); ++ /* status = */ serf__config_store_get_config(ctx, NULL, &config, pool); + + serf_bucket_set_config(defbkt, config); + } +@@ -1447,11 +1447,11 @@ + if (i == nr_of_loops - 1) { + CuAssertIntEquals(tc, APR_SUCCESS, + deflate_compress(&data, &len, &zdestr, msg, +- strlen(msg), 1, tb->pool)); ++ strlen(msg), 1, pool)); + } else { + CuAssertIntEquals(tc, APR_SUCCESS, + deflate_compress(&data, &len, &zdestr, msg, +- strlen(msg), 0, tb->pool)); ++ strlen(msg), 0, pool)); + } + + if (len == 0) +@@ -1469,10 +1469,15 @@ + static void test_deflate_buckets(CuTest *tc) + { + int i; ++ apr_pool_t *iterpool; ++ test_baton_t *tb = tc->testBaton; + ++ apr_pool_create(&iterpool, tb->pool); + for (i = 1; i < 1000; i++) { +- deflate_buckets(tc, i); ++ apr_pool_clear(iterpool); ++ deflate_buckets(tc, i, iterpool); + } ++ apr_pool_destroy(iterpool); + } + + static apr_status_t discard_data(serf_bucket_t *bkt, diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 396c5f2474..e77bad76d6 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -559,7 +559,10 @@ from streaming URLs. It is a command-line wrapper for the libquvi library.") (uri (string-append "http://serf.googlecode.com/svn/src_releases/serf-" version ".tar.bz2")) (sha256 - (base32 "14155g48gamcv5s0828bzij6vr14nqmbndwq8j8f9g6vcph0nl70")))) + (base32 "14155g48gamcv5s0828bzij6vr14nqmbndwq8j8f9g6vcph0nl70")) + (patches (map search-patch '("serf-comment-style-fix.patch" + "serf-deflate-buckets-test-fix.patch"))) + (patch-flags '("-p0")))) (build-system gnu-build-system) (native-inputs `(("scons" ,scons) @@ -587,13 +590,6 @@ from streaming URLs. It is a command-line wrapper for the libquvi library.") (substitute* "SConstruct" (("^env = Environment\\(") "env = Environment(ENV=os.environ, ")))) - (add-after 'unpack 'remove-non-c89-comment - (lambda _ - ;; The SConstruct file asks to compile with -std=c89, - ;; but there is a non-c89 comment in one of the files. - ;; Remove it. - (substitute* "test/test_buckets.c" - (("^//.*") "")))) (replace 'build (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) -- cgit v1.2.3 From 7b05ba9161579004ace734efc42d48c6f1708d5c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 6 May 2015 08:38:06 +0200 Subject: gnu: Add WebkitGTK 2.4.8. * gnu/packages/webkit.scm (webkitgtk-2.4): New variable. * gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + .../patches/webkitgtk-2.4.8-gmutexlocker.patch | 289 +++++++++++++++++++++ gnu/packages/webkit.scm | 32 +++ 3 files changed, 322 insertions(+) create mode 100644 gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index b5b71abdb0..75da645039 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -559,6 +559,7 @@ dist_patch_DATA = \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/vtk-mesa-10.patch \ gnu/packages/patches/w3m-fix-compile.patch \ + gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch \ gnu/packages/patches/weex-vacopy.patch \ gnu/packages/patches/wicd-urwid-1.3.patch \ gnu/packages/patches/wmctrl-64-fix.patch \ diff --git a/gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch b/gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch new file mode 100644 index 0000000000..79e12c302f --- /dev/null +++ b/gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch @@ -0,0 +1,289 @@ +Webkit's own WebCore::GMutexLocker conflicts with the GMutexLocker in +glib-2.44.0. + +Patch taken from . + + +diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp +--- webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.gmutexlocker 2015-02-18 15:40:21.851816374 +0100 ++++ webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2015-02-18 15:45:58.560092191 +0100 +@@ -316,7 +316,7 @@ void MediaPlayerPrivateGStreamerBase::mu + #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) + PassRefPtr MediaPlayerPrivateGStreamerBase::updateTexture(TextureMapper* textureMapper) + { +- GMutexLocker lock(m_bufferMutex); ++ WebCore::GMutexLocker lock(m_bufferMutex); + if (!m_buffer) + return nullptr; + +@@ -366,7 +366,7 @@ void MediaPlayerPrivateGStreamerBase::tr + g_return_if_fail(GST_IS_BUFFER(buffer)); + + { +- GMutexLocker lock(m_bufferMutex); ++ WebCore::GMutexLocker lock(m_bufferMutex); + gst_buffer_replace(&m_buffer, buffer); + } + +@@ -398,7 +398,7 @@ void MediaPlayerPrivateGStreamerBase::pa + if (!m_player->visible()) + return; + +- GMutexLocker lock(m_bufferMutex); ++ WebCore::GMutexLocker lock(m_bufferMutex); + if (!m_buffer) + return; + +diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp +--- webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp.gmutexlocker 2015-02-18 15:16:11.995228731 +0100 ++++ webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp 2015-02-18 15:45:42.686843477 +0100 +@@ -118,7 +118,7 @@ static gboolean webkitVideoSinkTimeoutCa + WebKitVideoSink* sink = reinterpret_cast(data); + WebKitVideoSinkPrivate* priv = sink->priv; + +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + GstBuffer* buffer = priv->buffer; + priv->buffer = 0; + priv->timeoutId = 0; +@@ -140,7 +140,7 @@ static GstFlowReturn webkitVideoSinkRend + WebKitVideoSink* sink = WEBKIT_VIDEO_SINK(baseSink); + WebKitVideoSinkPrivate* priv = sink->priv; + +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + + if (priv->unlocked) + return GST_FLOW_OK; +@@ -279,7 +279,7 @@ static void webkitVideoSinkGetProperty(G + + static void unlockBufferMutex(WebKitVideoSinkPrivate* priv) + { +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + + if (priv->buffer) { + gst_buffer_unref(priv->buffer); +@@ -305,7 +305,7 @@ static gboolean webkitVideoSinkUnlockSto + WebKitVideoSinkPrivate* priv = WEBKIT_VIDEO_SINK(baseSink)->priv; + + { +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + priv->unlocked = false; + } + +@@ -330,7 +330,7 @@ static gboolean webkitVideoSinkStart(Gst + { + WebKitVideoSinkPrivate* priv = WEBKIT_VIDEO_SINK(baseSink)->priv; + +- GMutexLocker lock(priv->bufferMutex); ++ WebCore::GMutexLocker lock(priv->bufferMutex); + priv->unlocked = false; + return TRUE; + } +diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp +--- webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp.gmutexlocker 2015-02-18 15:16:40.954678407 +0100 ++++ webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp 2015-02-18 15:45:19.567481225 +0100 +@@ -346,7 +346,7 @@ static void webKitWebSrcSetProperty(GObj + + switch (propID) { + case PROP_IRADIO_MODE: { +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + priv->iradioMode = g_value_get_boolean(value); + break; + } +@@ -364,7 +364,7 @@ static void webKitWebSrcGetProperty(GObj + WebKitWebSrc* src = WEBKIT_WEB_SRC(object); + WebKitWebSrcPrivate* priv = src->priv; + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + switch (propID) { + case PROP_IRADIO_MODE: + g_value_set_boolean(value, priv->iradioMode); +@@ -417,7 +417,7 @@ static gboolean webKitWebSrcStop(WebKitW + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + bool seeking = priv->seekID; + +@@ -476,7 +476,7 @@ static gboolean webKitWebSrcStart(WebKit + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + priv->startID = 0; + priv->corsAccessCheck = CORSNoCheck; +@@ -573,7 +573,7 @@ static GstStateChangeReturn webKitWebSrc + return ret; + } + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + switch (transition) { + case GST_STATE_CHANGE_READY_TO_PAUSED: + GST_DEBUG_OBJECT(src, "READY->PAUSED"); +@@ -604,7 +604,7 @@ static gboolean webKitWebSrcQueryWithPar + gst_query_parse_duration(query, &format, NULL); + + GST_DEBUG_OBJECT(src, "duration query in format %s", gst_format_get_name(format)); +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (format == GST_FORMAT_BYTES && src->priv->size > 0) { + gst_query_set_duration(query, format, src->priv->size); + result = TRUE; +@@ -612,7 +612,7 @@ static gboolean webKitWebSrcQueryWithPar + break; + } + case GST_QUERY_URI: { +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + gst_query_set_uri(query, src->priv->uri); + result = TRUE; + break; +@@ -653,7 +653,7 @@ static gchar* webKitWebSrcGetUri(GstURIH + WebKitWebSrc* src = WEBKIT_WEB_SRC(handler); + gchar* ret; + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + ret = g_strdup(src->priv->uri); + return ret; + } +@@ -668,7 +668,7 @@ static gboolean webKitWebSrcSetUri(GstUR + return FALSE; + } + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + g_free(priv->uri); + priv->uri = 0; +@@ -704,7 +704,7 @@ static gboolean webKitWebSrcNeedDataMain + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + // already stopped + if (!priv->needDataID) + return FALSE; +@@ -725,7 +725,7 @@ static void webKitWebSrcNeedDataCb(GstAp + + GST_DEBUG_OBJECT(src, "Need more data: %u", length); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (priv->needDataID || !priv->paused) { + return; + } +@@ -739,7 +739,7 @@ static gboolean webKitWebSrcEnoughDataMa + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + // already stopped + if (!priv->enoughDataID) + return FALSE; +@@ -760,7 +760,7 @@ static void webKitWebSrcEnoughDataCb(Gst + + GST_DEBUG_OBJECT(src, "Have enough data"); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (priv->enoughDataID || priv->paused) { + return; + } +@@ -774,7 +774,7 @@ static gboolean webKitWebSrcSeekMainCb(W + + ASSERT(isMainThread()); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + // already stopped + if (!priv->seekID) + return FALSE; +@@ -792,7 +792,7 @@ static gboolean webKitWebSrcSeekDataCb(G + WebKitWebSrcPrivate* priv = src->priv; + + GST_DEBUG_OBJECT(src, "Seeking to offset: %" G_GUINT64_FORMAT, offset); +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (offset == priv->offset && priv->requestedOffset == priv->offset) + return TRUE; + +@@ -811,7 +811,7 @@ static gboolean webKitWebSrcSeekDataCb(G + void webKitWebSrcSetMediaPlayer(WebKitWebSrc* src, WebCore::MediaPlayer* player) + { + ASSERT(player); +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + src->priv->player = player; + } + +@@ -841,7 +841,7 @@ char* StreamingClient::createReadBuffer( + + mapGstBuffer(buffer); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + priv->buffer = adoptGRef(buffer); + locker.unlock(); + +@@ -867,7 +867,7 @@ void StreamingClient::handleResponseRece + return; + } + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + priv->corsAccessCheck = corsAccessCheck; + +@@ -966,7 +966,7 @@ void StreamingClient::handleDataReceived + WebKitWebSrc* src = WEBKIT_WEB_SRC(m_src); + WebKitWebSrcPrivate* priv = src->priv; + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + + GST_LOG_OBJECT(src, "Have %lld bytes of data", priv->buffer ? static_cast(gst_buffer_get_size(priv->buffer.get())) : length); + +@@ -1035,7 +1035,7 @@ void StreamingClient::handleNotifyFinish + + GST_DEBUG_OBJECT(src, "Have EOS"); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + if (!priv->seekID) { + locker.unlock(); + gst_app_src_end_of_stream(priv->appsrc); +@@ -1194,7 +1194,7 @@ void ResourceHandleStreamingClient::wasB + + GST_ERROR_OBJECT(src, "Request was blocked"); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + uri.reset(g_strdup(src->priv->uri)); + locker.unlock(); + +@@ -1208,7 +1208,7 @@ void ResourceHandleStreamingClient::cann + + GST_ERROR_OBJECT(src, "Cannot show URL"); + +- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); ++ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); + uri.reset(g_strdup(src->priv->uri)); + locker.unlock(); + +diff -up webkitgtk-2.4.8/Source/WTF/wtf/gobject/GMutexLocker.h.gmutexlocker webkitgtk-2.4.8/Source/WTF/wtf/gobject/GMutexLocker.h diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index 9692ab0d36..b091c88601 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2015 David Hashe +;;; Copyright © 2015 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,9 +23,13 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages databases) #:use-module (gnu packages enchant) + #:use-module (gnu packages flex) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) #:use-module (gnu packages glib) @@ -108,3 +113,30 @@ HTML/CSS applications to full-fledged web browsers.") license:lgpl2.1+ license:bsd-2 license:bsd-3)))) + +(define-public webkitgtk-2.4 + ;; Latest release of the stable 2.4 series. + (package (inherit webkitgtk) + (name "webkitgtk") + (version "2.4.8") + (source (origin + (method url-fetch) + (uri (string-append "http://www.webkitgtk.org/releases/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "08xxqsxpa63nzgbsz63vrdxdxgpysyiy7jdcjb57k1hprdcibwb8")) + (patches (list (search-patch "webkitgtk-2.4.8-gmutexlocker.patch"))))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no tests + #:phases (modify-phases %standard-phases + (add-after + 'unpack 'set-gcc + (lambda _ (setenv "CC" "gcc") #t))) + #:configure-flags '("--enable-webkit2=no" + "--with-gtk=2.0"))) + (inputs + `(("flex" ,flex) + ("which" ,which) + ,@(package-inputs webkitgtk))))) -- cgit v1.2.3 From aa2e989e1e6d480e964b08a3395c1d7aa704e392 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 7 May 2015 18:40:15 -0400 Subject: gnu: linux-libre: Update to 4.0.2. * gnu/packages/patches/linux-libre-libreboot-fix.patch: Remove file. * gnu-system.am (dist_patch_DATA): Remove it. * gnu/packages/linux.scm (linux-libre): Update to 4.0.2. Remove patch. --- gnu-system.am | 1 - gnu/packages/linux.scm | 6 ++-- .../patches/linux-libre-libreboot-fix.patch | 37 ---------------------- 3 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 gnu/packages/patches/linux-libre-libreboot-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 817bad74f0..95378a7cb7 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -472,7 +472,6 @@ dist_patch_DATA = \ gnu/packages/patches/libvpx-fix-armhf-link.patch \ gnu/packages/patches/libvpx-fix-ssse3-quantize.patch \ gnu/packages/patches/libvpx-vp9-out-of-bounds-access.patch \ - gnu/packages/patches/linux-libre-libreboot-fix.patch \ gnu/packages/patches/lirc-localstatedir.patch \ gnu/packages/patches/lm-sensors-hwmon-attrs.patch \ gnu/packages/patches/lua51-liblua-so.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 62d27776e5..5da3979218 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -200,7 +200,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM." #f))) (define-public linux-libre - (let* ((version "4.0.1") + (let* ((version "4.0.2") (build-phase '(lambda* (#:key system inputs #:allow-other-keys #:rest args) ;; Apply the neat patch. @@ -273,9 +273,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM." (uri (linux-libre-urls version)) (sha256 (base32 - "1d5r26fh7dpdckvxfyn69r72h02yvri92rcmi2r658k56snsxs2k")) - (patches - (list (search-patch "linux-libre-libreboot-fix.patch"))))) + "18iyp2hzzb00jy389prp0lmby0i32qlbxjn74r4msmfra9s0w8mp")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) ("bc" ,bc) diff --git a/gnu/packages/patches/linux-libre-libreboot-fix.patch b/gnu/packages/patches/linux-libre-libreboot-fix.patch deleted file mode 100644 index d340a99fcb..0000000000 --- a/gnu/packages/patches/linux-libre-libreboot-fix.patch +++ /dev/null @@ -1,37 +0,0 @@ -This patch fixes linux-libre-3.19.x on Libreboot X60 machines. -Copied from https://bugzilla.kernel.org/show_bug.cgi?id=93171#c25 - ---- a/drivers/gpu/drm/i915/i915_irq.c -+++ a/drivers/gpu/drm/i915/i915_irq.c -@@ -3598,14 +3598,12 @@ static int i8xx_irq_postinstall(struct drm_device *dev) - ~(I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | - I915_DISPLAY_PIPE_B_EVENT_INTERRUPT | - I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | -- I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT | -- I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT); -+ I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT); - I915_WRITE16(IMR, dev_priv->irq_mask); - - I915_WRITE16(IER, - I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | - I915_DISPLAY_PIPE_B_EVENT_INTERRUPT | -- I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT | - I915_USER_INTERRUPT); - POSTING_READ16(IER); - -@@ -3767,14 +3765,12 @@ static int i915_irq_postinstall(struct drm_device *dev) - I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | - I915_DISPLAY_PIPE_B_EVENT_INTERRUPT | - I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | -- I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT | -- I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT); -+ I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT); - - enable_mask = - I915_ASLE_INTERRUPT | - I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | - I915_DISPLAY_PIPE_B_EVENT_INTERRUPT | -- I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT | - I915_USER_INTERRUPT; - - if (I915_HAS_HOTPLUG(dev)) { -- cgit v1.2.3 From cbf71ea25ebf4291ce379003f8df9f2dbcc4f3b9 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 7 May 2015 05:32:47 -0400 Subject: gnu: subversion: Add fix for sqlite-3.8.9. * gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/version-control.scm (subversion): Add patch. --- gnu-system.am | 1 + .../patches/subversion-sqlite-3.8.9-fix.patch | 59 ++++++++++++++++++++++ gnu/packages/version-control.scm | 5 +- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 95378a7cb7..77c7836671 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -544,6 +544,7 @@ dist_patch_DATA = \ gnu/packages/patches/slim-config.patch \ gnu/packages/patches/slim-sigusr1.patch \ gnu/packages/patches/soprano-find-clucene.patch \ + gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch \ gnu/packages/patches/superlu-dist-scotchmetis.patch \ gnu/packages/patches/tcsh-fix-autotest.patch \ gnu/packages/patches/teckit-cstdio.patch \ diff --git a/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch b/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch new file mode 100644 index 0000000000..92d8a85c8f --- /dev/null +++ b/gnu/packages/patches/subversion-sqlite-3.8.9-fix.patch @@ -0,0 +1,59 @@ +This upstream patch (r1672295) is needed to fix a test failure when built +against sqlite 3.8.9. See: + + https://mail-archives.apache.org/mod_mbox/subversion-dev/201504.mbox/%3C5526D197.6020808@gmx.de%3E + + +r1672295 | rhuijben | 2015-04-09 07:31:12 -0400 (Thu, 09 Apr 2015) | 15 lines + +Optimize STMT_SELECT_EXTERNALS_DEFINED when using Sqlite 3.8.9, by +adding two more rows to the sqlite_stat1 table. + +This fixes a test failure in wc-queries-test.c, but actual users most +likely don't notice a difference as a tablescan on an EXTERNALS tables +index is not that expensive, given that most working copies don't have +many externals. + +* subversion/libsvn_wc/wc-metadata.sql + (STMT_INSTALL_SCHEMA_STATISTICS): Add two rows. + +* subversion/tests/libsvn_wc/wc-queries-test.c + (test_schema_statistics): Add a dummy externals row to allow + verifying schema. + +Index: subversion/tests/libsvn_wc/wc-queries-test.c +=================================================================== +--- subversion/tests/libsvn_wc/wc-queries-test.c (revision 1672294) ++++ subversion/tests/libsvn_wc/wc-queries-test.c (revision 1672295) +@@ -927,6 +927,15 @@ + "VALUES (1, '', '')", + NULL, NULL, NULL)); + ++ SQLITE_ERR( ++ sqlite3_exec(sdb, ++ "INSERT INTO EXTERNALS (wc_id, local_relpath," ++ " parent_relpath, repos_id," ++ " presence, kind, def_local_relpath," ++ " def_repos_relpath) " ++ "VALUES (1, 'subdir', '', 1, 'normal', 'dir', '', '')", ++ NULL, NULL, NULL)); ++ + /* These are currently not necessary for query optimization, but it's better + to tell Sqlite how we intend to use this table anyway */ + SQLITE_ERR( +Index: subversion/libsvn_wc/wc-metadata.sql +=================================================================== +--- subversion/libsvn_wc/wc-metadata.sql (revision 1672294) ++++ subversion/libsvn_wc/wc-metadata.sql (revision 1672295) +@@ -619,6 +619,11 @@ + INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES + ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1', '100 100 1'); + ++INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES ++ ('EXTERNALS','sqlite_autoindex_EXTERNALS_1', '100 100 1'); ++INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES ++ ('EXTERNALS','I_EXTERNALS_DEFINED', '100 100 3 1'); ++ + /* sqlite_autoindex_WORK_QUEUE_1 doesn't exist because WORK_QUEUE is + a INTEGER PRIMARY KEY AUTOINCREMENT table */ + diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 96cab1eed7..0d153fa92d 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -547,7 +547,10 @@ property manipulation.") "subversion-" version ".tar.bz2")) (sha256 (base32 - "0ybmc0yq83jhblp42wdqvn2cryra3sypx8mkxn5b8lq7hilcr68h")))) + "0ybmc0yq83jhblp42wdqvn2cryra3sypx8mkxn5b8lq7hilcr68h")) + (patches + (list (search-patch "subversion-sqlite-3.8.9-fix.patch"))) + (patch-flags '("-p0")))) (build-system gnu-build-system) (arguments '(#:phases (alist-cons-after -- cgit v1.2.3 From 6f05630ba6848fa666f4ea57aab7f7ffbc15fc72 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 9 May 2015 15:40:14 +0200 Subject: gnu: wicd: Add patch to fix template instantiation. * gnu/packages/patches/wicd-template-instantiation.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/wicd.scm (wicd)[source]: Use it. --- gnu-system.am | 1 + .../patches/wicd-template-instantiation.patch | 29 ++++++++++++++++++++++ gnu/packages/wicd.scm | 4 ++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/wicd-template-instantiation.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 77c7836671..d3e91ed05b 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -562,6 +562,7 @@ dist_patch_DATA = \ gnu/packages/patches/w3m-fix-compile.patch \ gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch \ gnu/packages/patches/weex-vacopy.patch \ + gnu/packages/patches/wicd-template-instantiation.patch \ gnu/packages/patches/wicd-urwid-1.3.patch \ gnu/packages/patches/wmctrl-64-fix.patch \ gnu/packages/patches/wpa-supplicant-CVE-2015-1863.patch \ diff --git a/gnu/packages/patches/wicd-template-instantiation.patch b/gnu/packages/patches/wicd-template-instantiation.patch new file mode 100644 index 0000000000..16d8fa6e1d --- /dev/null +++ b/gnu/packages/patches/wicd-template-instantiation.patch @@ -0,0 +1,29 @@ +Wicd 1.7.3 fails to instantiate template lines that have several +variable references. For instance, the line: + + wep_key$_KEY_INDEX=$_KEY + +which is found in in the 'wep-hex' template, expands to these two +lines: + + wep_key0=$_KEY + wep_key0=123456789ab + +This patch fixes that by only emitting the fully substituted line. + +Patch by Ludovic Courtès . + +--- a/wicd/misc.py 2012-11-17 00:07:08 +0000 ++++ b/wicd/misc.py 2015-05-09 11:22:37 +0000 +@@ -321,11 +321,11 @@ def ParseEncryption(network): + rep_val = '0' + if rep_val: + line = line.replace("$_%s" % cur_val, str(rep_val)) +- config_file = ''.join([config_file, line]) + else: + print "Ignoring template line: '%s'" % line + else: + print "Weird parsing error occurred" ++ config_file = ''.join([config_file, line]) + else: # Just a regular entry. + config_file = ''.join([config_file, line]) diff --git a/gnu/packages/wicd.scm b/gnu/packages/wicd.scm index 1953a56b6c..779ec84e3c 100644 --- a/gnu/packages/wicd.scm +++ b/gnu/packages/wicd.scm @@ -44,7 +44,9 @@ "/+download/wicd-" version ".tar.gz")) (sha256 (base32 "00c4rq753bhg64rv1v9yl834ssq7igyy7cz3swp287b5n5bqiqwi")) - (patches (list (search-patch "wicd-urwid-1.3.patch"))))) + (patches (map search-patch + '("wicd-urwid-1.3.patch" + "wicd-template-instantiation.patch"))))) (build-system python-build-system) (native-inputs `(("gettext" ,gnu-gettext))) (inputs `(("dbus" ,dbus) -- cgit v1.2.3 From 8fda1b797063af19bda898e41dcf6a8369d8aed5 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Fri, 8 May 2015 19:37:05 +0200 Subject: Remove leftover patches. * gnu/packages/patches/guix-test-networking.patch: Delete it. * gnu/packages/patches/libtool-skip-tests.patch: Delete it. * gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch: Delete it. * gnu/packages/patches/udev-gir-libtool.patch: Delete it. * gnu-system.am (dist_patch_DATA): Remove them as well. --- gnu-system.am | 4 -- gnu/packages/patches/guix-test-networking.patch | 15 ------ gnu/packages/patches/libtool-skip-tests.patch | 55 ---------------------- .../patches/python-sqlite-3.8.4-test-fix.patch | 15 ------ gnu/packages/patches/udev-gir-libtool.patch | 17 ------- 5 files changed, 106 deletions(-) delete mode 100644 gnu/packages/patches/guix-test-networking.patch delete mode 100644 gnu/packages/patches/libtool-skip-tests.patch delete mode 100644 gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch delete mode 100644 gnu/packages/patches/udev-gir-libtool.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index d3e91ed05b..f5649f1a0f 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -448,7 +448,6 @@ dist_patch_DATA = \ gnu/packages/patches/guile-default-utf8.patch \ gnu/packages/patches/guile-linux-syscalls.patch \ gnu/packages/patches/guile-relocatable.patch \ - gnu/packages/patches/guix-test-networking.patch \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ gnu/packages/patches/hop-linker-flags.patch \ @@ -466,7 +465,6 @@ dist_patch_DATA = \ gnu/packages/patches/liboop-mips64-deplibs-fix.patch \ gnu/packages/patches/libmad-mips-newgcc.patch \ gnu/packages/patches/libtheora-config-guess.patch \ - gnu/packages/patches/libtool-skip-tests.patch \ gnu/packages/patches/libtool-skip-tests2.patch \ gnu/packages/patches/libssh-CVE-2014-0017.patch \ gnu/packages/patches/libvpx-fix-armhf-link.patch \ @@ -524,7 +522,6 @@ dist_patch_DATA = \ gnu/packages/patches/pyqt-configure.patch \ gnu/packages/patches/python-fix-tests.patch \ gnu/packages/patches/python-libffi-mips-n32-fix.patch \ - gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch \ gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch \ gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ @@ -550,7 +547,6 @@ dist_patch_DATA = \ gnu/packages/patches/teckit-cstdio.patch \ gnu/packages/patches/texi2html-document-encoding.patch \ gnu/packages/patches/texi2html-i18n.patch \ - gnu/packages/patches/udev-gir-libtool.patch \ gnu/packages/patches/unzip-CVE-2014-8139.patch \ gnu/packages/patches/unzip-CVE-2014-8140.patch \ gnu/packages/patches/unzip-CVE-2014-8141.patch \ diff --git a/gnu/packages/patches/guix-test-networking.patch b/gnu/packages/patches/guix-test-networking.patch deleted file mode 100644 index a8d1f4fd2f..0000000000 --- a/gnu/packages/patches/guix-test-networking.patch +++ /dev/null @@ -1,15 +0,0 @@ -Skip that test when the network is unreachable. - -diff --git a/tests/packages.scm b/tests/packages.scm -index 04e3b0b..6ac215b 100644 ---- a/tests/packages.scm -+++ b/tests/packages.scm -@@ -139,6 +139,8 @@ - (and (direct-store-path? source) - (string-suffix? "utils.scm" source)))) - -+(unless (false-if-exception (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)) -+ (test-skip 1)) - (test-equal "package-source-derivation, snippet" - "OK" - (let* ((file (search-bootstrap-binary "guile-2.0.9.tar.xz" diff --git a/gnu/packages/patches/libtool-skip-tests.patch b/gnu/packages/patches/libtool-skip-tests.patch deleted file mode 100644 index 9191d40487..0000000000 --- a/gnu/packages/patches/libtool-skip-tests.patch +++ /dev/null @@ -1,55 +0,0 @@ -Because our GCC 'lib' spec automatically adds '-rpath' for each '-L' -and a couple more '-rpath, there are two test failures: -one in demo.test, and one in destdir.at. Disable these. - -Also skip the nopic test on ARM and MIPS systems. - ---- libtool-2.4.6/tests/demo.at.orig 2015-01-16 13:52:04.000000000 -0500 -+++ libtool-2.4.6/tests/demo.at 2015-02-16 10:48:51.435851966 -0500 -@@ -510,7 +510,7 @@ - AT_SETUP([force non-PIC objects]) - - AT_CHECK([case $host in --hppa*|x86_64*|s390*) -+hppa*|x86_64*|s390*|arm*|mips*) - # These hosts cannot use non-PIC shared libs - exit 77 ;; - *-solaris*|*-sunos*) ---- libtool-2.4.6/tests/testsuite.orig 2015-02-15 11:15:25.000000000 -0500 -+++ libtool-2.4.6/tests/testsuite 2015-02-16 10:50:58.736483216 -0500 -@@ -8741,7 +8741,7 @@ - - { set +x - $as_echo "$at_srcdir/demo.at:535: case \$host in --hppa*|x86_64*|s390*) -+hppa*|x86_64*|s390*|arm*|mips*) - # These hosts cannot use non-PIC shared libs - exit 77 ;; - *-solaris*|*-sunos*) -@@ -8766,7 +8766,7 @@ - " - at_fn_check_prepare_notrace 'a `...` command substitution' "demo.at:535" - ( $at_check_trace; case $host in --hppa*|x86_64*|s390*) -+hppa*|x86_64*|s390*|arm*|mips*) - # These hosts cannot use non-PIC shared libs - exit 77 ;; - *-solaris*|*-sunos*) -@@ -9298,7 +9298,7 @@ - #AT_START_34 - at_fn_group_banner 34 'demo.at:548' \ - "hardcoding library path" " " 4 --at_xfail=no -+at_xfail=yes - test no = "$ACLOCAL" && at_xfail=yes - test no = "$AUTOHEADER" && at_xfail=yes - test no = "$AUTOMAKE" && at_xfail=yes -@@ -27243,7 +27243,7 @@ - #AT_START_98 - at_fn_group_banner 98 'destdir.at:75' \ - "DESTDIR with in-package deplibs" " " 8 --at_xfail=no -+at_xfail=yes - eval `$LIBTOOL --config | $GREP '^fast_install='` - case $fast_install in no) :;; *) false;; esac && at_xfail=yes - ( diff --git a/gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch b/gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch deleted file mode 100644 index 2f8b159870..0000000000 --- a/gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -From resolution of upstream python issue #20901: http://bugs.python.org/issue20901 - -diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py ---- Lib/sqlite3/test/hooks.py -+++ Lib/sqlite3/test/hooks.py -@@ -162,7 +162,7 @@ class ProgressTests(unittest.TestCase): - create table bar (a, b) - """) - second_count = len(progress_calls) -- self.assertGreater(first_count, second_count) -+ self.assertGreaterEqual(first_count, second_count) - - def CheckCancelOperation(self): - """ - diff --git a/gnu/packages/patches/udev-gir-libtool.patch b/gnu/packages/patches/udev-gir-libtool.patch deleted file mode 100644 index 7504f87eb8..0000000000 --- a/gnu/packages/patches/udev-gir-libtool.patch +++ /dev/null @@ -1,17 +0,0 @@ -Without this patch, 'ld' as invoked by 'g-ir-scanner' fails to find -lgudev-1.0 -This is because libtool puts it in $(top_builddir)/.libs. - -This patch forces 'g-ir-scanner' to use libtool, which enables it to find -libgudev-1.0.la. - ---- udev-182/Makefile.in 2014-06-22 14:55:07.000000000 +0200 -+++ udev-182/Makefile.in 2014-06-22 14:55:15.000000000 +0200 -@@ -3622,7 +3622,7 @@ test-sys-distclean: - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --namespace GUdev \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --nsversion=1.0 \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --include=GObject-2.0 \ --@ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --library=gudev-1.0 \ -+@ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --library=gudev-1.0 --libtool=$(top_builddir)/libtool \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --library-path=$(top_builddir)/src \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --library-path=$(top_builddir)/src/gudev \ - @ENABLE_GUDEV_TRUE@@ENABLE_INTROSPECTION_TRUE@ --output $@ \ -- cgit v1.2.3 From 6633f86b4941ec35bb4c328ec1e0b2bbfc41ad83 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Tue, 28 Apr 2015 22:21:37 +0300 Subject: gnu: Add tvtime. * gnu/packages/tv.scm, gnu/packages/patches/tvtime-gcc41.patch, gnu/packages/patches/tvtime-pngoutput.patch, gnu/packages/patches/tvtime-videodev2.patch, gnu/packages/patches/tvtime-xmltv.patch: New files. * gnu-system.am (GNU_SYSTEM_MODULES): Add package. (dist_patch_DATA): Add patches. --- gnu-system.am | 5 +++ gnu/packages/patches/tvtime-gcc41.patch | 58 ++++++++++++++++++++++++++ gnu/packages/patches/tvtime-pngoutput.patch | 15 +++++++ gnu/packages/patches/tvtime-videodev2.patch | 15 +++++++ gnu/packages/patches/tvtime-xmltv.patch | 28 +++++++++++++ gnu/packages/tv.scm | 64 +++++++++++++++++++++++++++++ 6 files changed, 185 insertions(+) create mode 100644 gnu/packages/patches/tvtime-gcc41.patch create mode 100644 gnu/packages/patches/tvtime-pngoutput.patch create mode 100644 gnu/packages/patches/tvtime-videodev2.patch create mode 100644 gnu/packages/patches/tvtime-xmltv.patch create mode 100644 gnu/packages/tv.scm (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index f5649f1a0f..0932ef4ad2 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -294,6 +294,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/tmux.scm \ gnu/packages/tor.scm \ gnu/packages/tre.scm \ + gnu/packages/tv.scm \ gnu/packages/unrtf.scm \ gnu/packages/upnp.scm \ gnu/packages/uucp.scm \ @@ -547,6 +548,10 @@ dist_patch_DATA = \ gnu/packages/patches/teckit-cstdio.patch \ gnu/packages/patches/texi2html-document-encoding.patch \ gnu/packages/patches/texi2html-i18n.patch \ + gnu/packages/patches/tvtime-gcc41.patch \ + gnu/packages/patches/tvtime-pngoutput.patch \ + gnu/packages/patches/tvtime-videodev2.patch \ + gnu/packages/patches/tvtime-xmltv.patch \ gnu/packages/patches/unzip-CVE-2014-8139.patch \ gnu/packages/patches/unzip-CVE-2014-8140.patch \ gnu/packages/patches/unzip-CVE-2014-8141.patch \ diff --git a/gnu/packages/patches/tvtime-gcc41.patch b/gnu/packages/patches/tvtime-gcc41.patch new file mode 100644 index 0000000000..d6e42721b8 --- /dev/null +++ b/gnu/packages/patches/tvtime-gcc41.patch @@ -0,0 +1,58 @@ +Source: https://projects.archlinux.org/svntogit/community.git/tree/trunk/tvtime-1.0.2-gcc41.patch?h=packages/tvtime + +--- tvtime-1.0.1/plugins/greedyh.asm 2005-08-14 18:16:43.000000000 +0200 ++++ tvtime-1.0.1-gcc41/plugins/greedyh.asm 2005-11-28 17:53:09.210774544 +0100 +@@ -18,7 +18,7 @@ + + #include "x86-64_macros.inc" + +-void DScalerFilterGreedyH::FUNCT_NAME(TDeinterlaceInfo* pInfo) ++void FUNCT_NAME(TDeinterlaceInfo* pInfo) + { + int64_t i; + bool InfoIsOdd = (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) ? 1 : 0; +diff -Naur tvtime-1.0.1/plugins/tomsmocomp/TomsMoCompAll2.inc tvtime-1.0.1-gcc41/plugins/tomsmocomp/TomsMoCompAll2.inc +--- tvtime-1.0.1/plugins/tomsmocomp/TomsMoCompAll2.inc 2004-10-20 17:31:05.000000000 +0200 ++++ tvtime-1.0.1-gcc41/plugins/tomsmocomp/TomsMoCompAll2.inc 2005-11-28 17:53:33.251119856 +0100 +@@ -5,9 +5,9 @@ + #endif + + #ifdef USE_STRANGE_BOB +-#define SEARCH_EFFORT_FUNC(n) DScalerFilterTomsMoComp::SEFUNC(n##_SB) ++#define SEARCH_EFFORT_FUNC(n) SEFUNC(n##_SB) + #else +-#define SEARCH_EFFORT_FUNC(n) DScalerFilterTomsMoComp::SEFUNC(n) ++#define SEARCH_EFFORT_FUNC(n) SEFUNC(n) + #endif + + int SEARCH_EFFORT_FUNC(0) // we don't try at all ;-) +diff -Naur tvtime-1.0.1/plugins/tomsmocomp.cpp tvtime-1.0.1-gcc41/plugins/tomsmocomp.cpp +--- tvtime-1.0.1/plugins/tomsmocomp.cpp 2004-10-20 19:38:04.000000000 +0200 ++++ tvtime-1.0.1-gcc41/plugins/tomsmocomp.cpp 2005-11-28 17:52:53.862107896 +0100 +@@ -31,7 +31,7 @@ + + #define IS_MMX + #define SSE_TYPE MMX +-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_MMX ++#define FUNCT_NAME filterDScaler_MMX + #include "tomsmocomp/TomsMoCompAll.inc" + #undef IS_MMX + #undef SSE_TYPE +@@ -39,7 +39,7 @@ + + #define IS_3DNOW + #define SSE_TYPE 3DNOW +-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_3DNOW ++#define FUNCT_NAME filterDScaler_3DNOW + #include "tomsmocomp/TomsMoCompAll.inc" + #undef IS_3DNOW + #undef SSE_TYPE +@@ -47,7 +47,7 @@ + + #define IS_SSE + #define SSE_TYPE SSE +-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_SSE ++#define FUNCT_NAME filterDScaler_SSE + #include "tomsmocomp/TomsMoCompAll.inc" + #undef IS_SSE + #undef SSE_TYPE diff --git a/gnu/packages/patches/tvtime-pngoutput.patch b/gnu/packages/patches/tvtime-pngoutput.patch new file mode 100644 index 0000000000..0d14f77ca1 --- /dev/null +++ b/gnu/packages/patches/tvtime-pngoutput.patch @@ -0,0 +1,15 @@ +Source: https://sources.debian.net/src/tvtime/1.0.2-14/debian/patches/libpng.diff + +From: Nobuhiro Iwamatsu +Date: Mon, 14 May 2012 19:01:31 +0900 +Prepares the package for libpng 1.5. Closes: #650582. + +--- tvtime-1.0.2.orig/src/pngoutput.c ++++ tvtime-1.0.2/src/pngoutput.c +@@ -18,5 +18,6 @@ + + #include + #include ++#include + #include + #include "pngoutput.h" diff --git a/gnu/packages/patches/tvtime-videodev2.patch b/gnu/packages/patches/tvtime-videodev2.patch new file mode 100644 index 0000000000..74131f25d0 --- /dev/null +++ b/gnu/packages/patches/tvtime-videodev2.patch @@ -0,0 +1,15 @@ +Fix compilation error: non-existing header file. + +This is an excerpt from the debian patch: +http://http.debian.net/debian/pool/main/t/tvtime/tvtime_1.0.2-14.diff.gz + +--- tvtime-1.0.2.orig/src/videodev2.h ++++ tvtime-1.0.2/src/videodev2.h +@@ -16,7 +16,6 @@ + #ifdef __KERNEL__ + #include /* need struct timeval */ + #endif +-#include /* need __user */ + + /* for kernel versions 2.4.26 and below: */ + #ifndef __user diff --git a/gnu/packages/patches/tvtime-xmltv.patch b/gnu/packages/patches/tvtime-xmltv.patch new file mode 100644 index 0000000000..2f4afc6e5a --- /dev/null +++ b/gnu/packages/patches/tvtime-xmltv.patch @@ -0,0 +1,28 @@ +Fix compilation error: conflicting types for 'locale_t'. + +This is an excerpt from the debian patch ... +http://http.debian.net/debian/pool/main/t/tvtime/tvtime_1.0.2-14.diff.gz + +--- tvtime-1.0.2.orig/src/xmltv.c ++++ tvtime-1.0.2/src/xmltv.c +@@ -118,9 +118,9 @@ + typedef struct { + const char *code; + const char *name; +-} locale_t; ++} tvtime_locale_t; + +-static locale_t locale_table[] = { ++static tvtime_locale_t locale_table[] = { + {"AA", "Afar"}, {"AB", "Abkhazian"}, {"AF", "Afrikaans"}, + {"AM", "Amharic"}, {"AR", "Arabic"}, {"AS", "Assamese"}, + {"AY", "Aymara"}, {"AZ", "Azerbaijani"}, {"BA", "Bashkir"}, +@@ -168,7 +168,7 @@ + {"XH", "Xhosa"}, {"YO", "Yoruba"}, {"ZH", "Chinese"}, + {"ZU", "Zulu"} }; + +-const int num_locales = sizeof( locale_table ) / sizeof( locale_t ); ++const int num_locales = sizeof( locale_table ) / sizeof( tvtime_locale_t ); + + /** + * Timezone parsing code based loosely on the algorithm in diff --git a/gnu/packages/tv.scm b/gnu/packages/tv.scm new file mode 100644 index 0000000000..0a229e149a --- /dev/null +++ b/gnu/packages/tv.scm @@ -0,0 +1,64 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Alex Kost +;;; +;;; 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 tv) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (gnu packages xorg) + #:use-module (gnu packages image) + #:use-module (gnu packages compression) + #:use-module (gnu packages xml) + #:use-module (gnu packages fontutils)) + +(define-public tvtime + (package + (name "tvtime") + (version "1.0.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/tvtime/tvtime-" + version ".tar.gz")) + (sha256 + (base32 + "08q5gzbyz0lxb730rz6d6amkzimlc7nanv6n50j2bpw4n2xa9wmf")) + (patches (list (search-patch "tvtime-videodev2.patch") + (search-patch "tvtime-pngoutput.patch") + (search-patch "tvtime-xmltv.patch") + (search-patch "tvtime-gcc41.patch"))))) + (build-system gnu-build-system) + (inputs + `(("libx11" ,libx11) + ("libxext" ,libxext) + ("libxt" ,libxt) + ("libxtst" ,libxtst) + ("libxinerama" ,libxinerama) + ("libxv" ,libxv) + ("libxxf86vm" ,libxxf86vm) + ("libpng" ,libpng) + ("libxml2" ,libxml2) + ("freetype" ,freetype) + ("zlib" ,zlib))) + (home-page "http://tvtime.sourceforge.net") + (synopsis "Television viewer") + (description + "Tvtime processes the input from your video capture card and +displays it on a monitor. It focuses on a high visual quality.") + (license license:gpl2+))) -- cgit v1.2.3 From d48c8e7b6070a63dc12ead0bb9ea47b790e237f0 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Mon, 11 May 2015 12:46:31 -0400 Subject: gnu: wpa-supplicant: Add security fixes. * gnu/packages/patches/wpa-supplicant-2015-2-fix.patch, gnu/packages/patches/wpa-supplicant-2015-3-fix.patch, gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch, gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch, gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch, gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch, gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch: New files. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/admin.scm (wpa-supplicant-light)[source]: Add patches. --- gnu-system.am | 7 ++ gnu/packages/admin.scm | 9 ++- .../patches/wpa-supplicant-2015-2-fix.patch | 51 +++++++++++++++ .../patches/wpa-supplicant-2015-3-fix.patch | 43 +++++++++++++ .../patches/wpa-supplicant-2015-4-fix-pt1.patch | 75 ++++++++++++++++++++++ .../patches/wpa-supplicant-2015-4-fix-pt2.patch | 68 ++++++++++++++++++++ .../patches/wpa-supplicant-2015-4-fix-pt3.patch | 54 ++++++++++++++++ .../patches/wpa-supplicant-2015-4-fix-pt4.patch | 52 +++++++++++++++ .../patches/wpa-supplicant-2015-4-fix-pt5.patch | 34 ++++++++++ 9 files changed, 392 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/wpa-supplicant-2015-2-fix.patch create mode 100644 gnu/packages/patches/wpa-supplicant-2015-3-fix.patch create mode 100644 gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch create mode 100644 gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch create mode 100644 gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch create mode 100644 gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch create mode 100644 gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 0932ef4ad2..6804fd3d38 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -567,6 +567,13 @@ dist_patch_DATA = \ gnu/packages/patches/wicd-urwid-1.3.patch \ gnu/packages/patches/wmctrl-64-fix.patch \ gnu/packages/patches/wpa-supplicant-CVE-2015-1863.patch \ + gnu/packages/patches/wpa-supplicant-2015-2-fix.patch \ + gnu/packages/patches/wpa-supplicant-2015-3-fix.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch \ + gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch \ gnu/packages/patches/xf86-video-ark-remove-mibstore.patch \ gnu/packages/patches/xf86-video-ast-remove-mibstore.patch \ gnu/packages/patches/xf86-video-geode-glibc-2.20.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 319bfad7e4..883f25d7c3 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -704,7 +704,14 @@ commands and their arguments.") (base32 "08li21q1wjn5chrv289w666il9ah1w419y3dkq2rl4wnq0rci385")) (patches - (list (search-patch "wpa-supplicant-CVE-2015-1863.patch"))))) + (map search-patch '("wpa-supplicant-CVE-2015-1863.patch" + "wpa-supplicant-2015-2-fix.patch" + "wpa-supplicant-2015-3-fix.patch" + "wpa-supplicant-2015-4-fix-pt1.patch" + "wpa-supplicant-2015-4-fix-pt2.patch" + "wpa-supplicant-2015-4-fix-pt3.patch" + "wpa-supplicant-2015-4-fix-pt4.patch" + "wpa-supplicant-2015-4-fix-pt5.patch"))))) (build-system gnu-build-system) (arguments '(#:phases (alist-replace diff --git a/gnu/packages/patches/wpa-supplicant-2015-2-fix.patch b/gnu/packages/patches/wpa-supplicant-2015-2-fix.patch new file mode 100644 index 0000000000..cd097006d2 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-2-fix.patch @@ -0,0 +1,51 @@ +Patch copied from http://w1.fi/security/2015-2/ + +From 5acd23f4581da58683f3cf5e36cb71bbe4070bd7 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Tue, 28 Apr 2015 17:08:33 +0300 +Subject: [PATCH] WPS: Fix HTTP chunked transfer encoding parser + +strtoul() return value may end up overflowing the int h->chunk_size and +resulting in a negative value to be stored as the chunk_size. This could +result in the following memcpy operation using a very large length +argument which would result in a buffer overflow and segmentation fault. + +This could have been used to cause a denial service by any device that +has been authorized for network access (either wireless or wired). This +would affect both the WPS UPnP functionality in a WPS AP (hostapd with +upnp_iface parameter set in the configuration) and WPS ER +(wpa_supplicant with WPS_ER_START control interface command used). + +Validate the parsed chunk length value to avoid this. In addition to +rejecting negative values, we can also reject chunk size that would be +larger than the maximum configured body length. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen +--- + src/wps/httpread.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/wps/httpread.c b/src/wps/httpread.c +index 2f08f37..d2855e3 100644 +--- a/src/wps/httpread.c ++++ b/src/wps/httpread.c +@@ -533,6 +533,13 @@ static void httpread_read_handler(int sd, void *eloop_ctx, void *sock_ctx) + if (!isxdigit(*cbp)) + goto bad; + h->chunk_size = strtoul(cbp, NULL, 16); ++ if (h->chunk_size < 0 || ++ h->chunk_size > h->max_bytes) { ++ wpa_printf(MSG_DEBUG, ++ "httpread: Invalid chunk size %d", ++ h->chunk_size); ++ goto bad; ++ } + /* throw away chunk header + * so we have only real data + */ +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-3-fix.patch b/gnu/packages/patches/wpa-supplicant-2015-3-fix.patch new file mode 100644 index 0000000000..de042f0c49 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-3-fix.patch @@ -0,0 +1,43 @@ +Patch copied from http://w1.fi/security/2015-3/ + +From ef566a4d4f74022e1fdb0a2addfe81e6de9f4aae Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Wed, 29 Apr 2015 02:21:53 +0300 +Subject: [PATCH] AP WMM: Fix integer underflow in WMM Action frame parser + +The length of the WMM Action frame was not properly validated and the +length of the information elements (int left) could end up being +negative. This would result in reading significantly past the stack +buffer while parsing the IEs in ieee802_11_parse_elems() and while doing +so, resulting in segmentation fault. + +This can result in an invalid frame being used for a denial of service +attack (hostapd process killed) against an AP with a driver that uses +hostapd for management frame processing (e.g., all mac80211-based +drivers). + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen +--- + src/ap/wmm.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/ap/wmm.c b/src/ap/wmm.c +index 6d4177c..314e244 100644 +--- a/src/ap/wmm.c ++++ b/src/ap/wmm.c +@@ -274,6 +274,9 @@ void hostapd_wmm_action(struct hostapd_data *hapd, + return; + } + ++ if (left < 0) ++ return; /* not a valid WMM Action frame */ ++ + /* extract the tspec info element */ + if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) { + hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211, +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch new file mode 100644 index 0000000000..7ebf5f4cc1 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt1.patch @@ -0,0 +1,75 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From dd2f043c9c43d156494e33d7ce22db96e6ef42c7 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 1 May 2015 16:37:45 +0300 +Subject: [PATCH 1/5] EAP-pwd peer: Fix payload length validation for Commit + and Confirm + +The length of the received Commit and Confirm message payloads was not +checked before reading them. This could result in a buffer read +overflow when processing an invalid message. + +Fix this by verifying that the payload is of expected length before +processing it. In addition, enforce correct state transition sequence to +make sure there is no unexpected behavior if receiving a Commit/Confirm +message before the previous exchanges have been completed. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen +--- + src/eap_peer/eap_pwd.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index f2b0926..a629437 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -355,6 +355,23 @@ eap_pwd_perform_commit_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *mask = NULL, *x = NULL, *y = NULL, *cofactor = NULL; + u16 offset; + u8 *ptr, *scalar = NULL, *element = NULL; ++ size_t prime_len, order_len; ++ ++ if (data->state != PWD_Commit_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } + + if (((data->private_value = BN_new()) == NULL) || + ((data->my_element = EC_POINT_new(data->grp->group)) == NULL) || +@@ -554,6 +571,18 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (data->state != PWD_Confirm_Req) { ++ ret->ignore = TRUE; ++ goto fin; ++ } ++ ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* + * first build up the ciphersuite which is group | random_function | + * prf +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch new file mode 100644 index 0000000000..c11e4175d9 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt2.patch @@ -0,0 +1,68 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From e28a58be26184c2a23f80b410e0997ef1bd5d578 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 1 May 2015 16:40:44 +0300 +Subject: [PATCH 2/5] EAP-pwd server: Fix payload length validation for Commit + and Confirm + +The length of the received Commit and Confirm message payloads was not +checked before reading them. This could result in a buffer read +overflow when processing an invalid message. + +Fix this by verifying that the payload is of expected length before +processing it. In addition, enforce correct state transition sequence to +make sure there is no unexpected behavior if receiving a Commit/Confirm +message before the previous exchanges have been completed. + +Thanks to Kostya Kortchinsky of Google security team for discovering and +reporting this issue. + +Signed-off-by: Jouni Malinen +--- + src/eap_server/eap_server_pwd.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index 66bd5d2..3189105 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -656,9 +656,21 @@ eap_pwd_process_commit_resp(struct eap_sm *sm, struct eap_pwd_data *data, + BIGNUM *x = NULL, *y = NULL, *cofactor = NULL; + EC_POINT *K = NULL, *point = NULL; + int res = 0; ++ size_t prime_len, order_len; + + wpa_printf(MSG_DEBUG, "EAP-pwd: Received commit response"); + ++ prime_len = BN_num_bytes(data->grp->prime); ++ order_len = BN_num_bytes(data->grp->order); ++ ++ if (payload_len != 2 * prime_len + order_len) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Commit payload length %u (expected %u)", ++ (unsigned int) payload_len, ++ (unsigned int) (2 * prime_len + order_len)); ++ goto fin; ++ } ++ + if (((data->peer_scalar = BN_new()) == NULL) || + ((data->k = BN_new()) == NULL) || + ((cofactor = BN_new()) == NULL) || +@@ -774,6 +786,13 @@ eap_pwd_process_confirm_resp(struct eap_sm *sm, struct eap_pwd_data *data, + u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr; + int offset; + ++ if (payload_len != SHA256_MAC_LEN) { ++ wpa_printf(MSG_INFO, ++ "EAP-pwd: Unexpected Confirm payload length %u (expected %u)", ++ (unsigned int) payload_len, SHA256_MAC_LEN); ++ goto fin; ++ } ++ + /* build up the ciphersuite: group | random_function | prf */ + grp = htons(data->group_num); + ptr = (u8 *) &cs; +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch new file mode 100644 index 0000000000..963dac9270 --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt3.patch @@ -0,0 +1,54 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From 477c74395acd0123340457ba6f15ab345d42016e Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sat, 2 May 2015 19:23:04 +0300 +Subject: [PATCH 3/5] EAP-pwd peer: Fix Total-Length parsing for fragment + reassembly + +The remaining number of bytes in the message could be smaller than the +Total-Length field size, so the length needs to be explicitly checked +prior to reading the field and decrementing the len variable. This could +have resulted in the remaining length becoming negative and interpreted +as a huge positive integer. + +In addition, check that there is no already started fragment in progress +before allocating a new buffer for reassembling fragments. This avoid a +potential memory leak when processing invalid message. + +Signed-off-by: Jouni Malinen +--- + src/eap_peer/eap_pwd.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index a629437..1d2079b 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -866,11 +866,23 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + * if it's the first fragment there'll be a length field + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments whose " + "total length = %d", tot_len); + if (tot_len > 15000) + return NULL; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ ret->ignore = TRUE; ++ return NULL; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "Out of memory to buffer " +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch new file mode 100644 index 0000000000..3d945382bc --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt4.patch @@ -0,0 +1,52 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From 3035cc2894e08319b905bd6561e8bddc8c2db9fa Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sat, 2 May 2015 19:26:06 +0300 +Subject: [PATCH 4/5] EAP-pwd server: Fix Total-Length parsing for fragment + reassembly + +The remaining number of bytes in the message could be smaller than the +Total-Length field size, so the length needs to be explicitly checked +prior to reading the field and decrementing the len variable. This could +have resulted in the remaining length becoming negative and interpreted +as a huge positive integer. + +In addition, check that there is no already started fragment in progress +before allocating a new buffer for reassembling fragments. This avoid a +potential memory leak when processing invalid message. + +Signed-off-by: Jouni Malinen +--- + src/eap_server/eap_server_pwd.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index 3189105..2bfc3c2 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -942,11 +942,21 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + * the first fragment has a total length + */ + if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) { ++ if (len < 2) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Frame too short to contain Total-Length field"); ++ return; ++ } + tot_len = WPA_GET_BE16(pos); + wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments, total " + "length = %d", tot_len); + if (tot_len > 15000) + return; ++ if (data->inbuf) { ++ wpa_printf(MSG_DEBUG, ++ "EAP-pwd: Unexpected new fragment start when previous fragment is still in use"); ++ return; ++ } + data->inbuf = wpabuf_alloc(tot_len); + if (data->inbuf == NULL) { + wpa_printf(MSG_INFO, "EAP-pwd: Out of memory to " +-- +1.9.1 + diff --git a/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch new file mode 100644 index 0000000000..30f71974ad --- /dev/null +++ b/gnu/packages/patches/wpa-supplicant-2015-4-fix-pt5.patch @@ -0,0 +1,34 @@ +Patch copied from http://w1.fi/security/2015-4/ + +From 28a069a545b06b99eb55ad53f63f2c99e65a98f6 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sat, 2 May 2015 19:26:28 +0300 +Subject: [PATCH 5/5] EAP-pwd peer: Fix asymmetric fragmentation behavior + +The L (Length) and M (More) flags needs to be cleared before deciding +whether the locally generated response requires fragmentation. This +fixes an issue where these flags from the server could have been invalid +for the following message. In some cases, this could have resulted in +triggering the wpabuf security check that would terminate the process +due to invalid buffer allocation. + +Signed-off-by: Jouni Malinen +--- + src/eap_peer/eap_pwd.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index 1d2079b..e58b13a 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -968,6 +968,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + /* + * we have output! Do we need to fragment it? + */ ++ lm_exch = EAP_PWD_GET_EXCHANGE(lm_exch); + len = wpabuf_len(data->outbuf); + if ((len + EAP_PWD_HDR_SIZE) > data->mtu) { + resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, data->mtu, +-- +1.9.1 + -- cgit v1.2.3 From 083b54b7c74a68958fe84b8f627123a030775d1e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 12 May 2015 18:41:58 +0200 Subject: gnu: inetutils: Update to 1.9.3. * gnu/packages/patches/inetutils-syslogd.patch: Remove. * gnu-system.am (dist_patch_DATA): Adjust accordingly. * gnu/packages/admin.scm (inetutils): Bump to 1.9.3. [source]: Remove patch. [native-inputs]: Remove. --- gnu-system.am | 1 - gnu/packages/admin.scm | 9 ++------- gnu/packages/patches/inetutils-syslogd.patch | 20 -------------------- 3 files changed, 2 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/inetutils-syslogd.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 6804fd3d38..d9053bdb7e 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -452,7 +452,6 @@ dist_patch_DATA = \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ gnu/packages/patches/hop-linker-flags.patch \ - gnu/packages/patches/inetutils-syslogd.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 883f25d7c3..a96ce9cdfb 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -152,25 +152,20 @@ re-executing them as necessary.") (define-public inetutils (package (name "inetutils") - (version "1.9.2") + (version "1.9.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/inetutils/inetutils-" version ".tar.gz")) (sha256 (base32 - "04wrm0v7l4890mmbaawd6wjwdv08bkglgqhpz0q4dkb0l50fl8q4")) - (patches (list (search-patch "inetutils-syslogd.patch"))))) + "06dshajjpyi9sxi7qfki9gnp5r3nxvyvf81r81gx0x2qkqzqcxlj")))) (build-system gnu-build-system) (arguments `(;; FIXME: `tftp.sh' relies on `netstat' from utils-linux, ;; which is currently missing. #:tests? #f)) (inputs `(("ncurses" ,ncurses) ("readline" ,readline))) ; for 'ftp' - - ;; Help2man is needed because of the patch that modifies syslogd.c. - (native-inputs `(("help2man" ,help2man))) - (home-page "http://www.gnu.org/software/inetutils/") (synopsis "Basic networking utilities") (description diff --git a/gnu/packages/patches/inetutils-syslogd.patch b/gnu/packages/patches/inetutils-syslogd.patch deleted file mode 100644 index 0bf9eb7fc6..0000000000 --- a/gnu/packages/patches/inetutils-syslogd.patch +++ /dev/null @@ -1,20 +0,0 @@ -From . - -2015-04-01 Ludovic Courtès - - * src/syslogd.c (load_conffile): Use 'bcopy' instead of 'strcpy' - since the two regions may overlap. - Reported by Alex Kost - at . - ---- a/src/syslogd.c -+++ b/src/syslogd.c -@@ -1989,7 +1989,7 @@ load_conffile (const char *filename, struct filed **nextp) - if (*p == '\0' || *p == '#') - continue; - -- strcpy (cline, p); -+ bcopy (p, cline, strlen (p) + 1); - - /* Cut the trailing spaces. */ - for (p = strchr (cline, '\0'); isspace (*--p);) -- cgit v1.2.3 From e1820d14439abedb1cb1caa5cd9f68bcfcbbd466 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 12 May 2015 23:18:29 -0400 Subject: gnu: icecat: Apply fixes for CVE-2015-{0797,2708,2710,2713,2716}. * gnu/packages/patches/icecat-CVE-2015-0797.patch, gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch, gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch, gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch, gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch, gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch, gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch, gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch, gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch, gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch, gnu/packages/patches/icecat-CVE-2015-2716.patch: New files. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/gnuzilla.scm (icecat): Add patches. --- gnu-system.am | 11 + gnu/packages/gnuzilla.scm | 13 +- gnu/packages/patches/icecat-CVE-2015-0797.patch | 35 +++ .../patches/icecat-CVE-2015-2708-pt1.patch | 240 +++++++++++++++++ .../patches/icecat-CVE-2015-2708-pt2.patch | 284 +++++++++++++++++++++ .../patches/icecat-CVE-2015-2708-pt3.patch | 228 +++++++++++++++++ .../patches/icecat-CVE-2015-2708-pt4.patch | 26 ++ .../patches/icecat-CVE-2015-2710-pt1.patch | 199 +++++++++++++++ .../patches/icecat-CVE-2015-2710-pt2.patch | 64 +++++ .../patches/icecat-CVE-2015-2710-pt3.patch | 50 ++++ .../patches/icecat-CVE-2015-2713-pt1.patch | 102 ++++++++ .../patches/icecat-CVE-2015-2713-pt2.patch | 47 ++++ gnu/packages/patches/icecat-CVE-2015-2716.patch | 62 +++++ 13 files changed, 1360 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/icecat-CVE-2015-0797.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch create mode 100644 gnu/packages/patches/icecat-CVE-2015-2716.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index d9053bdb7e..e25eae59fe 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -452,6 +452,17 @@ dist_patch_DATA = \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ gnu/packages/patches/hop-linker-flags.patch \ + gnu/packages/patches/icecat-CVE-2015-0797.patch \ + gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch \ + gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch \ + gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch \ + gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch \ + gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch \ + gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch \ + gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch \ + gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch \ + gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch \ + gnu/packages/patches/icecat-CVE-2015-2716.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 8031a6c4ce..0207bcbad2 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -233,7 +233,18 @@ standards.") name "-" version ".tar.bz2")) (sha256 (base32 - "1a4l23msg4cpc4yp59q2z6xv63r6advlbnjy65v4djv6yhgnqf1i")))) + "1a4l23msg4cpc4yp59q2z6xv63r6advlbnjy65v4djv6yhgnqf1i")) + (patches (map search-patch '("icecat-CVE-2015-0797.patch" + "icecat-CVE-2015-2708-pt1.patch" + "icecat-CVE-2015-2708-pt2.patch" + "icecat-CVE-2015-2708-pt3.patch" + "icecat-CVE-2015-2708-pt4.patch" + "icecat-CVE-2015-2710-pt1.patch" + "icecat-CVE-2015-2710-pt2.patch" + "icecat-CVE-2015-2710-pt3.patch" + "icecat-CVE-2015-2713-pt1.patch" + "icecat-CVE-2015-2713-pt2.patch" + "icecat-CVE-2015-2716.patch"))))) (build-system gnu-build-system) (inputs `(("alsa-lib" ,alsa-lib) diff --git a/gnu/packages/patches/icecat-CVE-2015-0797.patch b/gnu/packages/patches/icecat-CVE-2015-0797.patch new file mode 100644 index 0000000000..5727ed753c --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-0797.patch @@ -0,0 +1,35 @@ +From 147543038273042f71284fa8487c71670163da5f Mon Sep 17 00:00:00 2001 +From: Ralph Giles +Date: Tue, 31 Mar 2015 16:18:22 -0700 +Subject: [PATCH] Bug 1080995 - Don't use the h264parser gstreamer element. + r=kinetik, a=sledru + +--- + content/media/gstreamer/GStreamerFormatHelper.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/content/media/gstreamer/GStreamerFormatHelper.cpp b/content/media/gstreamer/GStreamerFormatHelper.cpp +index 25095e7..ebd12c2 100644 +--- a/content/media/gstreamer/GStreamerFormatHelper.cpp ++++ b/content/media/gstreamer/GStreamerFormatHelper.cpp +@@ -67,6 +67,7 @@ static char const * const sDefaultCodecCaps[][2] = { + + static char const * const sPluginBlacklist[] = { + "flump3dec", ++ "h264parse", + }; + + GStreamerFormatHelper::GStreamerFormatHelper() +@@ -251,7 +252,8 @@ static gboolean FactoryFilter(GstPluginFeature *aFeature, gpointer) + const gchar *className = + gst_element_factory_get_klass(GST_ELEMENT_FACTORY_CAST(aFeature)); + +- if (!strstr(className, "Decoder") && !strstr(className, "Demux")) { ++ if (!strstr(className, "Decoder") && !strstr(className, "Demux") && ++ !strstr(className, "Parser")) { + return FALSE; + } + +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch new file mode 100644 index 0000000000..e755d7531a --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch @@ -0,0 +1,240 @@ +From 5f61ae17ec82d288a3fe4892ec999c0e20c486c0 Mon Sep 17 00:00:00 2001 +From: "Byron Campen [:bwc]" +Date: Mon, 6 Apr 2015 11:52:28 -0700 +Subject: [PATCH] Bug 1151139 - Simplify how we choose which streams to gather + stats from. r=mt, a=abillings + +--- + ...t_peerConnection_offerRequiresReceiveAudio.html | 2 + + ...t_peerConnection_offerRequiresReceiveVideo.html | 2 + + ...rConnection_offerRequiresReceiveVideoAudio.html | 2 + + media/mtransport/nricectx.h | 13 +++++ + media/mtransport/nricemediastream.cpp | 1 + + media/mtransport/nricemediastream.h | 5 +- + .../src/peerconnection/PeerConnectionImpl.cpp | 66 ++++++++++------------ + .../src/peerconnection/PeerConnectionImpl.h | 2 +- + 8 files changed, 54 insertions(+), 39 deletions(-) + +diff --git a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html +index 69d7e49..d68c078 100644 +--- a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html ++++ b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html +@@ -17,6 +17,8 @@ + + runTest(function() { + var test = new PeerConnectionTest(); ++ test.chain.remove('PC_LOCAL_CHECK_STATS'); ++ test.chain.remove('PC_REMOTE_CHECK_STATS'); + test.setOfferConstraints({ mandatory: { OfferToReceiveAudio: true } }); + test.run(); + }); +diff --git a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html +index 5f1d0e5..0ecb0b7 100644 +--- a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html ++++ b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html +@@ -17,6 +17,8 @@ + + runTest(function() { + var test = new PeerConnectionTest(); ++ test.chain.remove('PC_LOCAL_CHECK_STATS'); ++ test.chain.remove('PC_REMOTE_CHECK_STATS'); + test.setOfferConstraints({ mandatory: { OfferToReceiveVideo: true } }); + test.run(); + }); +diff --git a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html +index c3dea10..78eb0d4 100644 +--- a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html ++++ b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html +@@ -17,6 +17,8 @@ + + runTest(function() { + var test = new PeerConnectionTest(); ++ test.chain.remove('PC_LOCAL_CHECK_STATS'); ++ test.chain.remove('PC_REMOTE_CHECK_STATS'); + test.setOfferConstraints({ mandatory: { + OfferToReceiveVideo: true, + OfferToReceiveAudio: true +diff --git a/media/mtransport/nricectx.h b/media/mtransport/nricectx.h +index d1209a7..7350666 100644 +--- a/media/mtransport/nricectx.h ++++ b/media/mtransport/nricectx.h +@@ -196,6 +196,19 @@ class NrIceCtx { + RefPtr CreateStream(const std::string& name, + int components); + ++ RefPtr GetStream(size_t index) { ++ if (index < streams_.size()) { ++ return streams_[index]; ++ } ++ return nullptr; ++ } ++ ++ // Some might be null ++ size_t GetStreamCount() const ++ { ++ return streams_.size(); ++ } ++ + // The name of the ctx + const std::string& name() const { return name_; } + +diff --git a/media/mtransport/nricemediastream.cpp b/media/mtransport/nricemediastream.cpp +index 9e96cb5..d2b6429 100644 +--- a/media/mtransport/nricemediastream.cpp ++++ b/media/mtransport/nricemediastream.cpp +@@ -209,6 +209,7 @@ nsresult NrIceMediaStream::ParseAttributes(std::vector& + return NS_ERROR_FAILURE; + } + ++ has_parsed_attrs_ = true; + return NS_OK; + } + +diff --git a/media/mtransport/nricemediastream.h b/media/mtransport/nricemediastream.h +index aba5fc3..2494ecf 100644 +--- a/media/mtransport/nricemediastream.h ++++ b/media/mtransport/nricemediastream.h +@@ -149,6 +149,7 @@ class NrIceMediaStream { + + // Parse remote attributes + nsresult ParseAttributes(std::vector& candidates); ++ bool HasParsedAttributes() const { return has_parsed_attrs_; } + + // Parse trickle ICE candidate + nsresult ParseTrickleCandidate(const std::string& candidate); +@@ -204,7 +205,8 @@ class NrIceMediaStream { + name_(name), + components_(components), + stream_(nullptr), +- opaque_(nullptr) {} ++ opaque_(nullptr), ++ has_parsed_attrs_(false) {} + + DISALLOW_COPY_ASSIGN(NrIceMediaStream); + +@@ -214,6 +216,7 @@ class NrIceMediaStream { + const int components_; + nr_ice_media_stream *stream_; + ScopedDeletePtr opaque_; ++ bool has_parsed_attrs_; + }; + + +diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +index ebcc17d..c70e3e4 100644 +--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp ++++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +@@ -149,7 +149,8 @@ PRLogModuleInfo *signalingLogInfo() { + namespace sipcc { + + #ifdef MOZILLA_INTERNAL_API +-RTCStatsQuery::RTCStatsQuery(bool internal) : internalStats(internal) { ++RTCStatsQuery::RTCStatsQuery(bool internal) : internalStats(internal), ++ grabAllLevels(false) { + } + + RTCStatsQuery::~RTCStatsQuery() { +@@ -2037,32 +2038,8 @@ PeerConnectionImpl::BuildStatsQuery_m( + + query->iceCtx = mMedia->ice_ctx(); + +- // From the list of MediaPipelines, determine the set of NrIceMediaStreams +- // we are interested in. +- std::set levelsToGrab; +- if (trackId) { +- for (size_t p = 0; p < query->pipelines.Length(); ++p) { +- size_t level = query->pipelines[p]->level(); +- MOZ_ASSERT(level); +- levelsToGrab.insert(level); +- } +- } else { +- // We want to grab all streams, so ignore the pipelines (this also ends up +- // grabbing DataChannel streams, which is what we want) +- for (size_t s = 0; s < mMedia->num_ice_media_streams(); ++s) { +- levelsToGrab.insert(s + 1); // mIceStreams is 0-indexed +- } +- } +- +- for (auto s = levelsToGrab.begin(); s != levelsToGrab.end(); ++s) { +- // TODO(bcampen@mozilla.com): I may need to revisit this for bundle. +- // (Bug 786234) +- RefPtr temp(mMedia->ice_media_stream(*s - 1)); +- RefPtr flow(mMedia->GetTransportFlow(*s, false)); +- // flow can be null for unused levels, such as unused DataChannels +- if (temp && flow) { +- query->streams.AppendElement(temp); +- } ++ if (!trackId) { ++ query->grabAllLevels = true; + } + + return rv; +@@ -2103,6 +2080,9 @@ static void RecordIceStats_s( + bool internalStats, + DOMHighResTimeStamp now, + RTCStatsReportInternal* report) { ++ if (!mediaStream.HasParsedAttributes()) { ++ return; ++ } + + NS_ConvertASCIItoUTF16 componentId(mediaStream.name().c_str()); + if (internalStats) { +@@ -2292,20 +2272,32 @@ PeerConnectionImpl::ExecuteStatsQuery_s(RTCStatsQuery *query) { + break; + } + } ++ ++ if (!query->grabAllLevels) { ++ // If we're grabbing all levels, that means we want datachannels too, ++ // which don't have pipelines. ++ if (query->iceCtx->GetStream(p - 1)) { ++ RecordIceStats_s(*query->iceCtx->GetStream(p - 1), ++ query->internalStats, ++ query->now, ++ &(query->report)); ++ } ++ } + } + +- // Gather stats from ICE +- for (size_t s = 0; s != query->streams.Length(); ++s) { +- RecordIceStats_s(*query->streams[s], +- query->internalStats, +- query->now, +- &(query->report)); ++ if (query->grabAllLevels) { ++ for (size_t i = 0; i < query->iceCtx->GetStreamCount(); ++i) { ++ if (query->iceCtx->GetStream(i)) { ++ RecordIceStats_s(*query->iceCtx->GetStream(i), ++ query->internalStats, ++ query->now, ++ &(query->report)); ++ } ++ } + } + +- // NrIceCtx and NrIceMediaStream must be destroyed on STS, so it is not safe +- // to dispatch them back to main. +- // We clear streams first to maintain destruction order +- query->streams.Clear(); ++ // NrIceCtx must be destroyed on STS, so it is not safe ++ // to dispatch it back to main. + query->iceCtx = nullptr; + return NS_OK; + } +diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h +index 847085c..497230a 100644 +--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h ++++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h +@@ -174,7 +174,7 @@ class RTCStatsQuery { + bool internalStats; + nsTArray> pipelines; + mozilla::RefPtr iceCtx; +- nsTArray> streams; ++ bool grabAllLevels; + DOMHighResTimeStamp now; + }; + #endif // MOZILLA_INTERNAL_API +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch new file mode 100644 index 0000000000..9788806557 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch @@ -0,0 +1,284 @@ +From 272c1ba11fac7a9ceede2f4f737bb27b4bbcad71 Mon Sep 17 00:00:00 2001 +From: Steve Fink +Date: Thu, 19 Mar 2015 20:50:57 -0700 +Subject: [PATCH] Bug 1120655 - Suppress zone/compartment collection while + iterating. r=terrence, a=bkerensa + +--- + js/src/gc/Zone.h | 9 ++++---- + js/src/jsgc.cpp | 57 +++++++++++++++++++++++++++++++++++---------------- + js/src/jsgc.h | 11 +++++++++- + js/src/vm/Runtime.cpp | 1 + + js/src/vm/Runtime.h | 3 +++ + 5 files changed, 58 insertions(+), 23 deletions(-) + +diff --git a/js/src/gc/Zone.h b/js/src/gc/Zone.h +index e7f687a..dd058f0 100644 +--- a/js/src/gc/Zone.h ++++ b/js/src/gc/Zone.h +@@ -353,10 +353,11 @@ enum ZoneSelector { + + class ZonesIter { + private: ++ gc::AutoEnterIteration iterMarker; + JS::Zone **it, **end; + + public: +- ZonesIter(JSRuntime *rt, ZoneSelector selector) { ++ ZonesIter(JSRuntime *rt, ZoneSelector selector) : iterMarker(rt) { + it = rt->zones.begin(); + end = rt->zones.end(); + +@@ -427,13 +428,13 @@ struct CompartmentsInZoneIter + template + class CompartmentsIterT + { +- private: ++ gc::AutoEnterIteration iterMarker; + ZonesIterT zone; + mozilla::Maybe comp; + + public: + explicit CompartmentsIterT(JSRuntime *rt) +- : zone(rt) ++ : iterMarker(rt), zone(rt) + { + if (zone.done()) + comp.construct(); +@@ -442,7 +443,7 @@ class CompartmentsIterT + } + + CompartmentsIterT(JSRuntime *rt, ZoneSelector selector) +- : zone(rt, selector) ++ : iterMarker(rt), zone(rt, selector) + { + if (zone.done()) + comp.construct(); +diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp +index 15c86c8..1dfe0ab 100644 +--- a/js/src/jsgc.cpp ++++ b/js/src/jsgc.cpp +@@ -2525,7 +2525,7 @@ ReleaseObservedTypes(JSRuntime* rt) + * arbitrary compartment in the zone. + */ + static void +-SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool lastGC) ++SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool destroyingRuntime) + { + JSRuntime *rt = zone->runtimeFromMainThread(); + JSDestroyCompartmentCallback callback = rt->destroyCompartmentCallback; +@@ -2543,7 +2543,7 @@ SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool lastGC) + * deleted and keepAtleastOne is true. + */ + bool dontDelete = read == end && !foundOne && keepAtleastOne; +- if ((!comp->marked && !dontDelete) || lastGC) { ++ if ((!comp->marked && !dontDelete) || destroyingRuntime) { + if (callback) + callback(fop, comp); + if (comp->principals) +@@ -2559,9 +2559,13 @@ SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool lastGC) + } + + static void +-SweepZones(FreeOp *fop, bool lastGC) ++SweepZones(FreeOp *fop, bool destroyingRuntime) + { + JSRuntime *rt = fop->runtime(); ++ MOZ_ASSERT_IF(destroyingRuntime, rt->numActiveZoneIters == 0); ++ if (rt->numActiveZoneIters) ++ return; ++ + JSZoneCallback callback = rt->destroyZoneCallback; + + /* Skip the atomsCompartment zone. */ +@@ -2576,17 +2580,17 @@ SweepZones(FreeOp* fop, bool lastGC) + + if (zone->wasGCStarted()) { + if ((zone->allocator.arenas.arenaListsAreEmpty() && !zone->hasMarkedCompartments()) || +- lastGC) ++ destroyingRuntime) + { + zone->allocator.arenas.checkEmptyFreeLists(); + if (callback) + callback(zone); +- SweepCompartments(fop, zone, false, lastGC); ++ SweepCompartments(fop, zone, false, destroyingRuntime); + JS_ASSERT(zone->compartments.empty()); + fop->delete_(zone); + continue; + } +- SweepCompartments(fop, zone, true, lastGC); ++ SweepCompartments(fop, zone, true, destroyingRuntime); + } + *write++ = zone; + } +@@ -3787,7 +3791,7 @@ EndSweepingZoneGroup(JSRuntime *rt) + } + + static void +-BeginSweepPhase(JSRuntime *rt, bool lastGC) ++BeginSweepPhase(JSRuntime *rt, bool destroyingRuntime) + { + /* + * Sweep phase. +@@ -3804,7 +3808,7 @@ BeginSweepPhase(JSRuntime *rt, bool lastGC) + gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_SWEEP); + + #ifdef JS_THREADSAFE +- rt->gcSweepOnBackgroundThread = !lastGC && rt->useHelperThreads(); ++ rt->gcSweepOnBackgroundThread = !destroyingRuntime && rt->useHelperThreads(); + #endif + + #ifdef DEBUG +@@ -3903,12 +3907,12 @@ SweepPhase(JSRuntime *rt, SliceBudget &sliceBudget) + } + + static void +-EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool lastGC) ++EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool destroyingRuntime) + { + gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_SWEEP); + FreeOp fop(rt, rt->gcSweepOnBackgroundThread); + +- JS_ASSERT_IF(lastGC, !rt->gcSweepOnBackgroundThread); ++ JS_ASSERT_IF(destroyingRuntime, !rt->gcSweepOnBackgroundThread); + + JS_ASSERT(rt->gcMarker.isDrained()); + rt->gcMarker.stop(); +@@ -3959,8 +3963,8 @@ EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool lastGC) + * This removes compartments from rt->compartment, so we do it last to make + * sure we don't miss sweeping any compartments. + */ +- if (!lastGC) +- SweepZones(&fop, lastGC); ++ if (!destroyingRuntime) ++ SweepZones(&fop, destroyingRuntime); + + if (!rt->gcSweepOnBackgroundThread) { + /* +@@ -4001,8 +4005,8 @@ EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool lastGC) + rt->freeLifoAlloc.freeAll(); + + /* Ensure the compartments get swept if it's the last GC. */ +- if (lastGC) +- SweepZones(&fop, lastGC); ++ if (destroyingRuntime) ++ SweepZones(&fop, destroyingRuntime); + } + + for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) { +@@ -4339,7 +4343,7 @@ IncrementalCollectSlice(JSRuntime *rt, + AutoCopyFreeListToArenasForGC copy(rt); + AutoGCSlice slice(rt); + +- bool lastGC = (reason == JS::gcreason::DESTROY_RUNTIME); ++ bool destroyingRuntime = (reason == JS::gcreason::DESTROY_RUNTIME); + + gc::State initialState = rt->gcIncrementalState; + +@@ -4384,7 +4388,7 @@ IncrementalCollectSlice(JSRuntime *rt, + return; + } + +- if (!lastGC) ++ if (!destroyingRuntime) + PushZealSelectedObjects(rt); + + rt->gcIncrementalState = MARK; +@@ -4426,7 +4430,7 @@ IncrementalCollectSlice(JSRuntime *rt, + * This runs to completion, but we don't continue if the budget is + * now exhasted. + */ +- BeginSweepPhase(rt, lastGC); ++ BeginSweepPhase(rt, destroyingRuntime); + if (sliceBudget.isOverBudget()) + break; + +@@ -4445,7 +4449,7 @@ IncrementalCollectSlice(JSRuntime *rt, + if (!finished) + break; + +- EndSweepPhase(rt, gckind, lastGC); ++ EndSweepPhase(rt, gckind, destroyingRuntime); + + if (rt->gcSweepOnBackgroundThread) + rt->gcHelperThread.startBackgroundSweep(gckind == GC_SHRINK); +@@ -5386,3 +5390,20 @@ JS::AutoAssertNoGC::~AutoAssertNoGC() + MOZ_ASSERT(gcNumber == runtime->gcNumber, "GC ran inside an AutoAssertNoGC scope."); + } + #endif ++ ++namespace js { ++namespace gc { ++ ++AutoEnterIteration::AutoEnterIteration(JSRuntime *rt_) : rt(rt_) ++{ ++ ++rt->numActiveZoneIters; ++} ++ ++AutoEnterIteration::~AutoEnterIteration() ++{ ++ MOZ_ASSERT(rt->numActiveZoneIters); ++ --rt->numActiveZoneIters; ++} ++ ++} /* namespace gc */ ++} /* namespace js */ +diff --git a/js/src/jsgc.h b/js/src/jsgc.h +index 825cff5..ca331c0 100644 +--- a/js/src/jsgc.h ++++ b/js/src/jsgc.h +@@ -1077,7 +1077,7 @@ MaybeVerifyBarriers(JSContext* cx, bool always = false) + /* + * Instances of this class set the |JSRuntime::suppressGC| flag for the duration + * that they are live. Use of this class is highly discouraged. Please carefully +- * read the comment in jscntxt.h above |suppressGC| and take all appropriate ++ * read the comment in vm/Runtime.h above |suppressGC| and take all appropriate + * precautions before instantiating this class. + */ + class AutoSuppressGC +@@ -1113,6 +1113,15 @@ class AutoEnterOOMUnsafeRegion + class AutoEnterOOMUnsafeRegion {}; + #endif /* DEBUG */ + ++/* Prevent compartments and zones from being collected during iteration. */ ++class AutoEnterIteration { ++ JSRuntime *rt; ++ ++ public: ++ AutoEnterIteration(JSRuntime *rt_); ++ ~AutoEnterIteration(); ++}; ++ + } /* namespace gc */ + + #ifdef DEBUG +diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp +index bb5c8680..0d8c6cd 100644 +--- a/js/src/vm/Runtime.cpp ++++ b/js/src/vm/Runtime.cpp +@@ -195,6 +195,7 @@ JSRuntime::JSRuntime(JSRuntime *parentRuntime, JSUseHelperThreads useHelperThrea + gcShouldCleanUpEverything(false), + gcGrayBitsValid(false), + gcIsNeeded(0), ++ numActiveZoneIters(0), + gcStats(thisFromCtor()), + gcNumber(0), + gcStartNumber(0), +diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h +index 5aeb924..ba4180e 100644 +--- a/js/src/vm/Runtime.h ++++ b/js/src/vm/Runtime.h +@@ -1061,6 +1061,9 @@ struct JSRuntime : public JS::shadow::Runtime, + */ + volatile uintptr_t gcIsNeeded; + ++ mozilla::Atomic numActiveZoneIters; ++ friend class js::gc::AutoEnterIteration; ++ + js::gcstats::Statistics gcStats; + + /* Incremented on every GC slice. */ +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch new file mode 100644 index 0000000000..f684804d0b --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch @@ -0,0 +1,228 @@ +From 4dcbca8b3c26b451e1376cd1b7c88ab984a45b39 Mon Sep 17 00:00:00 2001 +From: Mats Palmgren +Date: Tue, 14 Apr 2015 22:12:39 -0400 +Subject: [PATCH] Bug 1143299 - Make frame insertion methods deal with + aPrevFrame being on an overflow list. r=roc, a=bkerensa + +--- + layout/generic/nsBlockFrame.cpp | 18 ++++++++++++--- + layout/generic/nsBlockFrame.h | 14 ++++++++---- + layout/generic/nsContainerFrame.cpp | 41 +++++++++++++++++++--------------- + layout/tables/nsTableFrame.cpp | 2 ++ + layout/tables/nsTableRowFrame.cpp | 2 ++ + layout/tables/nsTableRowGroupFrame.cpp | 2 ++ + 6 files changed, 54 insertions(+), 25 deletions(-) + +diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp +index a011bcf..70d5297 100644 +--- a/layout/generic/nsBlockFrame.cpp ++++ b/layout/generic/nsBlockFrame.cpp +@@ -1049,7 +1049,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext, + state.mOverflowTracker = &tracker; + + // Drain & handle pushed floats +- DrainPushedFloats(state); ++ DrainPushedFloats(); + nsOverflowAreas fcBounds; + nsReflowStatus fcStatus = NS_FRAME_COMPLETE; + ReflowPushedFloats(state, fcBounds, fcStatus); +@@ -4438,9 +4438,13 @@ nsBlockFrame::DrainSelfOverflowList() + * might push some of them on). Floats with placeholders in this block + * are reflowed by (nsBlockReflowState/nsLineLayout)::AddFloat, which + * also maintains these invariants. ++ * ++ * DrainSelfPushedFloats moves any pushed floats from this block's own ++ * PushedFloats list back into mFloats. DrainPushedFloats additionally ++ * moves frames from its prev-in-flow's PushedFloats list into mFloats. + */ + void +-nsBlockFrame::DrainPushedFloats(nsBlockReflowState& aState) ++nsBlockFrame::DrainSelfPushedFloats() + { + #ifdef DEBUG + // Between when we drain pushed floats and when we complete reflow, +@@ -4503,12 +4507,18 @@ nsBlockFrame::DrainPushedFloats(nsBlockReflowState& aState) + RemovePushedFloats()->Delete(presContext->PresShell()); + } + } ++} ++ ++void ++nsBlockFrame::DrainPushedFloats() ++{ ++ DrainSelfPushedFloats(); + + // After our prev-in-flow has completed reflow, it may have a pushed + // floats list, containing floats that we need to own. Take these. + nsBlockFrame* prevBlock = static_cast(GetPrevInFlow()); + if (prevBlock) { +- AutoFrameListPtr list(presContext, prevBlock->RemovePushedFloats()); ++ AutoFrameListPtr list(PresContext(), prevBlock->RemovePushedFloats()); + if (list && list->NotEmpty()) { + mFloats.InsertFrames(this, nullptr, *list); + } +@@ -4711,6 +4721,7 @@ nsBlockFrame::AppendFrames(ChildListID aListID, + return nsContainerFrame::AppendFrames(aListID, aFrameList); + } + else if (kFloatList == aListID) { ++ DrainSelfPushedFloats(); // ensure the last frame is in mFloats + mFloats.AppendFrames(nullptr, aFrameList); + return NS_OK; + } +@@ -4757,6 +4768,7 @@ nsBlockFrame::InsertFrames(ChildListID aListID, + return nsContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList); + } + else if (kFloatList == aListID) { ++ DrainSelfPushedFloats(); // ensure aPrevFrame is in mFloats + mFloats.InsertFrames(this, aPrevFrame, aFrameList); + return NS_OK; + } +diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h +index 1a6bb1e..07f7508 100644 +--- a/layout/generic/nsBlockFrame.h ++++ b/layout/generic/nsBlockFrame.h +@@ -533,10 +533,16 @@ protected: + return GetStateBits() & NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS; + } + +- /** grab pushed floats from this block's prevInFlow, and splice +- * them into this block's mFloats list. +- */ +- void DrainPushedFloats(nsBlockReflowState& aState); ++ /** ++ * Moves frames from our PushedFloats list back into our mFloats list. ++ */ ++ void DrainSelfPushedFloats(); ++ ++ /** ++ * First calls DrainSelfPushedFloats() then grabs pushed floats from this ++ * block's prev-in-flow, and splice them into this block's mFloats list too. ++ */ ++ void DrainPushedFloats(); + + /** Load all our floats into the float manager (without reflowing them). + * Assumes float manager is in our own coordinate system. +diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp +index 76f0748..3ffcba7 100644 +--- a/layout/generic/nsContainerFrame.cpp ++++ b/layout/generic/nsContainerFrame.cpp +@@ -102,16 +102,18 @@ nsContainerFrame::AppendFrames(ChildListID aListID, + return NS_ERROR_INVALID_ARG; + } + } +- if (aFrameList.NotEmpty()) { +- mFrames.AppendFrames(this, aFrameList); + +- // Ask the parent frame to reflow me. +- if (aListID == kPrincipalList) +- { +- PresContext()->PresShell()-> +- FrameNeedsReflow(this, nsIPresShell::eTreeChange, +- NS_FRAME_HAS_DIRTY_CHILDREN); +- } ++ if (MOZ_UNLIKELY(aFrameList.IsEmpty())) { ++ return NS_OK; ++ } ++ ++ DrainSelfOverflowList(); // ensure the last frame is in mFrames ++ mFrames.AppendFrames(this, aFrameList); ++ ++ if (aListID != kNoReflowPrincipalList) { ++ PresContext()->PresShell()-> ++ FrameNeedsReflow(this, nsIPresShell::eTreeChange, ++ NS_FRAME_HAS_DIRTY_CHILDREN); + } + return NS_OK; + } +@@ -131,16 +133,19 @@ nsContainerFrame::InsertFrames(ChildListID aListID, + return NS_ERROR_INVALID_ARG; + } + } +- if (aFrameList.NotEmpty()) { +- // Insert frames after aPrevFrame +- mFrames.InsertFrames(this, aPrevFrame, aFrameList); + +- if (aListID == kPrincipalList) +- { +- PresContext()->PresShell()-> +- FrameNeedsReflow(this, nsIPresShell::eTreeChange, +- NS_FRAME_HAS_DIRTY_CHILDREN); +- } ++ if (MOZ_UNLIKELY(aFrameList.IsEmpty())) { ++ return NS_OK; ++ } ++ ++ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames ++ mFrames.InsertFrames(this, aPrevFrame, aFrameList); ++ ++ if (aListID != kNoReflowPrincipalList) { ++ PresContext()->PresShell()-> ++ FrameNeedsReflow(this, nsIPresShell::eTreeChange, ++ NS_FRAME_HAS_DIRTY_CHILDREN); ++ + } + return NS_OK; + } +diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp +index 60613ba..44088da 100644 +--- a/layout/tables/nsTableFrame.cpp ++++ b/layout/tables/nsTableFrame.cpp +@@ -2232,6 +2232,7 @@ nsTableFrame::AppendFrames(ChildListID aListID, + InsertColGroups(startColIndex, + nsFrameList::Slice(mColGroups, f, f->GetNextSibling())); + } else if (IsRowGroup(display->mDisplay)) { ++ DrainSelfOverflowList(); // ensure the last frame is in mFrames + // Append the new row group frame to the sibling chain + mFrames.AppendFrame(nullptr, f); + +@@ -2404,6 +2405,7 @@ nsTableFrame::HomogenousInsertFrames(ChildListID aListID, + InsertColGroups(startColIndex, newColgroups); + } else if (IsRowGroup(display->mDisplay)) { + NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); ++ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames + // Insert the frames in the sibling chain + const nsFrameList::Slice& newRowGroups = + mFrames.InsertFrames(nullptr, aPrevFrame, aFrameList); +diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp +index d1c493b..2351de3 100644 +--- a/layout/tables/nsTableRowFrame.cpp ++++ b/layout/tables/nsTableRowFrame.cpp +@@ -182,6 +182,7 @@ nsTableRowFrame::AppendFrames(ChildListID aListID, + { + NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); + ++ DrainSelfOverflowList(); // ensure the last frame is in mFrames + const nsFrameList::Slice& newCells = mFrames.AppendFrames(nullptr, aFrameList); + + // Add the new cell frames to the table +@@ -208,6 +209,7 @@ nsTableRowFrame::InsertFrames(ChildListID aListID, + NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); + NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, + "inserting after sibling frame with different parent"); ++ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames + //Insert Frames in the frame list + const nsFrameList::Slice& newCells = mFrames.InsertFrames(nullptr, aPrevFrame, aFrameList); + +diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp +index 34aaf02..40b349b 100644 +--- a/layout/tables/nsTableRowGroupFrame.cpp ++++ b/layout/tables/nsTableRowGroupFrame.cpp +@@ -1389,6 +1389,7 @@ nsTableRowGroupFrame::AppendFrames(ChildListID aListID, + { + NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); + ++ DrainSelfOverflowList(); // ensure the last frame is in mFrames + ClearRowCursor(); + + // collect the new row frames in an array +@@ -1430,6 +1431,7 @@ nsTableRowGroupFrame::InsertFrames(ChildListID aListID, + NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, + "inserting after sibling frame with different parent"); + ++ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames + ClearRowCursor(); + + // collect the new row frames in an array +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch new file mode 100644 index 0000000000..eb2295f5ac --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch @@ -0,0 +1,26 @@ +From e6082e031f0fa2a4a7a63ff124c6f22aeb75393d Mon Sep 17 00:00:00 2001 +From: Terrence Cole +Date: Fri, 10 Apr 2015 08:58:26 -0700 +Subject: [PATCH] Bug 1152177 - Make jsid and Value pre barriers symetrical. + r=jonco, a=abillings + +--- + js/src/gc/Barrier.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/js/src/gc/Barrier.h b/js/src/gc/Barrier.h +index 7efd785..9fc6bd0 100644 +--- a/js/src/gc/Barrier.h ++++ b/js/src/gc/Barrier.h +@@ -1062,6 +1062,8 @@ class BarrieredId + JS_ASSERT(obj == JSID_TO_OBJECT(value)); + } + } else if (JSID_IS_STRING(value)) { ++ if (StringIsPermanentAtom(JSID_TO_STRING(value))) ++ return; + JSString *str = JSID_TO_STRING(value); + JS::shadow::Zone *shadowZone = ShadowZoneOfStringFromAnyThread(str); + if (shadowZone->needsBarrier()) { +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch b/gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch new file mode 100644 index 0000000000..4f119f6fe9 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch @@ -0,0 +1,199 @@ +From 0bd8486f4088c0845514986f61861688e0be011d Mon Sep 17 00:00:00 2001 +From: Cameron McCormack +Date: Mon, 6 Apr 2015 09:11:55 -0400 +Subject: [PATCH] Bug 1149542 - Part 1: Return early from SVG text layout if we + discover mPositions is not long enough. r=dholbert, a=sledru + +--- + layout/svg/SVGTextFrame.cpp | 59 +++++++++++++++++++++++++++++++-------------- + layout/svg/SVGTextFrame.h | 23 ++++++++++++------ + 2 files changed, 56 insertions(+), 26 deletions(-) + +diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp +index 721e699..45327881 100644 +--- a/layout/svg/SVGTextFrame.cpp ++++ b/layout/svg/SVGTextFrame.cpp +@@ -14,6 +14,7 @@ + #include "gfxTypes.h" + #include "LookAndFeel.h" + #include "mozilla/gfx/2D.h" ++#include "mozilla/Likely.h" + #include "nsAlgorithm.h" + #include "nsBlockFrame.h" + #include "nsCaret.h" +@@ -4316,23 +4317,28 @@ ShouldStartRunAtIndex(const nsTArray& aPositions, + return false; + } + +-uint32_t +-SVGTextFrame::ResolvePositions(nsIContent* aContent, +- uint32_t aIndex, +- bool aInTextPath, +- bool& aForceStartOfChunk, +- nsTArray& aDeltas) ++bool ++SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, ++ uint32_t& aIndex, ++ bool aInTextPath, ++ bool& aForceStartOfChunk, ++ nsTArray& aDeltas) + { + if (aContent->IsNodeOfType(nsINode::eTEXT)) { + // We found a text node. + uint32_t length = static_cast(aContent)->TextLength(); + if (length) { ++ uint32_t end = aIndex + length; ++ if (MOZ_UNLIKELY(end > mPositions.Length())) { ++ MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " ++ "found by iterating content"); ++ return false; ++ } + if (aForceStartOfChunk) { + // Note this character as starting a new anchored chunk. + mPositions[aIndex].mStartOfChunk = true; + aForceStartOfChunk = false; + } +- uint32_t end = aIndex + length; + while (aIndex < end) { + // Record whether each of these characters should start a new rendered + // run. That is always the case for characters on a text path. +@@ -4345,18 +4351,23 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, + aIndex++; + } + } +- return aIndex; ++ return true; + } + + // Skip past elements that aren't text content elements. + if (!IsTextContentElement(aContent)) { +- return aIndex; ++ return true; + } + + if (aContent->Tag() == nsGkAtoms::textPath) { + // elements are as if they are specified with x="0" y="0", but + // only if they actually have some text content. + if (HasTextContent(aContent)) { ++ if (MOZ_UNLIKELY(aIndex >= mPositions.Length())) { ++ MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " ++ "found by iterating content"); ++ return false; ++ } + mPositions[aIndex].mPosition = gfxPoint(); + mPositions[aIndex].mStartOfChunk = true; + } +@@ -4376,8 +4387,14 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, + rotate = &animatedRotate->GetAnimValue(); + } + +- uint32_t count = GetTextContentLength(aContent); + bool percentages = false; ++ uint32_t count = GetTextContentLength(aContent); ++ ++ if (MOZ_UNLIKELY(aIndex + count > mPositions.Length())) { ++ MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " ++ "found by iterating content"); ++ return false; ++ } + + // New text anchoring chunks start at each character assigned a position + // with x="" or y="", or if we forced one with aForceStartOfChunk due to +@@ -4456,8 +4473,11 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, + for (nsIContent* child = aContent->GetFirstChild(); + child; + child = child->GetNextSibling()) { +- aIndex = ResolvePositions(child, aIndex, inTextPath, aForceStartOfChunk, +- aDeltas); ++ bool ok = ResolvePositionsForNode(child, aIndex, inTextPath, ++ aForceStartOfChunk, aDeltas); ++ if (!ok) { ++ return false; ++ } + } + + if (aContent->Tag() == nsGkAtoms::textPath) { +@@ -4465,7 +4485,7 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, + aForceStartOfChunk = true; + } + +- return aIndex; ++ return true; + } + + bool +@@ -4501,8 +4521,10 @@ SVGTextFrame::ResolvePositions(nsTArray& aDeltas, + + // Recurse over the content and fill in character positions as we go. + bool forceStartOfChunk = false; +- return ResolvePositions(mContent, 0, aRunPerGlyph, +- forceStartOfChunk, aDeltas) != 0; ++ index = 0; ++ bool ok = ResolvePositionsForNode(mContent, index, aRunPerGlyph, ++ forceStartOfChunk, aDeltas); ++ return ok && index > 0; + } + + void +@@ -4958,9 +4980,10 @@ SVGTextFrame::DoGlyphPositioning() + // Get the x, y, dx, dy, rotate values for the subtree. + nsTArray deltas; + if (!ResolvePositions(deltas, adjustingTextLength)) { +- // If ResolvePositions returned false, it means that there were some +- // characters in the DOM but none of them are displayed. Clear out +- // mPositions so that we don't attempt to do any painting later. ++ // If ResolvePositions returned false, it means either there were some ++ // characters in the DOM but none of them are displayed, or there was ++ // an error in processing mPositions. Clear out mPositions so that we don't ++ // attempt to do any painting later. + mPositions.Clear(); + return; + } +diff --git a/layout/svg/SVGTextFrame.h b/layout/svg/SVGTextFrame.h +index 48951f7..912af8b 100644 +--- a/layout/svg/SVGTextFrame.h ++++ b/layout/svg/SVGTextFrame.h +@@ -505,15 +505,18 @@ private: + * Recursive helper for ResolvePositions below. + * + * @param aContent The current node. +- * @param aIndex The current character index. ++ * @param aIndex (in/out) The current character index. + * @param aInTextPath Whether we are currently under a element. +- * @param aForceStartOfChunk Whether the next character we find should start a +- * new anchored chunk. +- * @return The character index we got up to. ++ * @param aForceStartOfChunk (in/out) Whether the next character we find ++ * should start a new anchored chunk. ++ * @param aDeltas (in/out) Receives the resolved dx/dy values for each ++ * character. ++ * @return false if we discover that mPositions did not have enough ++ * elements; true otherwise. + */ +- uint32_t ResolvePositions(nsIContent* aContent, uint32_t aIndex, +- bool aInTextPath, bool& aForceStartOfChunk, +- nsTArray& aDeltas); ++ bool ResolvePositionsForNode(nsIContent* aContent, uint32_t& aIndex, ++ bool aInTextPath, bool& aForceStartOfChunk, ++ nsTArray& aDeltas); + + /** + * Initializes mPositions with character position information based on +@@ -521,9 +524,13 @@ private: + * was not given for that character. Also fills aDeltas with values based on + * dx/dy attributes. + * ++ * @param aDeltas (in/out) Receives the resolved dx/dy values for each ++ * character. + * @param aRunPerGlyph Whether mPositions should record that a new run begins + * at each glyph. +- * @return True if we recorded any positions. ++ * @return false if we did not record any positions (due to having no ++ * displayed characters) or if we discover that mPositions did not have ++ * enough elements; true otherwise. + */ + bool ResolvePositions(nsTArray& aDeltas, bool aRunPerGlyph); + +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch b/gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch new file mode 100644 index 0000000000..26a10ca2e4 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch @@ -0,0 +1,64 @@ +From f7c0070831e72735c43beb426ac0c2ce33403f4f Mon Sep 17 00:00:00 2001 +From: Cameron McCormack +Date: Mon, 6 Apr 2015 09:12:06 -0400 +Subject: [PATCH] Bug 1149542 - Part 2: Track undisplayed characters before + empty text frames properly. r=dholbert, a=sledru + +--- + layout/svg/SVGTextFrame.cpp | 29 ++++++++++++++++------------- + 1 file changed, 16 insertions(+), 13 deletions(-) + +diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp +index 45327881..9d331b8 100644 +--- a/layout/svg/SVGTextFrame.cpp ++++ b/layout/svg/SVGTextFrame.cpp +@@ -290,22 +290,25 @@ GetNonEmptyTextFrameAndNode(nsIFrame* aFrame, + nsTextNode*& aTextNode) + { + nsTextFrame* text = do_QueryFrame(aFrame); +- if (!text) { +- return false; +- } ++ bool isNonEmptyTextFrame = text && text->GetContentLength() != 0; + +- nsIContent* content = text->GetContent(); +- NS_ASSERTION(content && content->IsNodeOfType(nsINode::eTEXT), +- "unexpected content type for nsTextFrame"); ++ if (isNonEmptyTextFrame) { ++ nsIContent* content = text->GetContent(); ++ NS_ASSERTION(content && content->IsNodeOfType(nsINode::eTEXT), ++ "unexpected content type for nsTextFrame"); + +- nsTextNode* node = static_cast(content); +- if (node->TextLength() == 0) { +- return false; ++ nsTextNode* node = static_cast(content); ++ MOZ_ASSERT(node->TextLength() != 0, ++ "frame's GetContentLength() should be 0 if the text node " ++ "has no content"); ++ ++ aTextFrame = text; ++ aTextNode = node; + } + +- aTextFrame = text; +- aTextNode = node; +- return true; ++ MOZ_ASSERT(IsNonEmptyTextFrame(aFrame) == isNonEmptyTextFrame, ++ "our logic should agree with IsNonEmptyTextFrame"); ++ return isNonEmptyTextFrame; + } + + /** +@@ -1298,7 +1301,7 @@ GetUndisplayedCharactersBeforeFrame(nsTextFrame* aFrame) + /** + * Traverses the nsTextFrames for an SVGTextFrame and records a + * TextNodeCorrespondenceProperty on each for the number of undisplayed DOM +- * characters between each frame. This is done by iterating simultaenously ++ * characters between each frame. This is done by iterating simultaneously + * over the nsTextNodes and nsTextFrames and noting when nsTextNodes (or + * parts of them) are skipped when finding the next nsTextFrame. + */ +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch b/gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch new file mode 100644 index 0000000000..6759506213 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch @@ -0,0 +1,50 @@ +From 2cda46e6158a459b56b392c8e389b055fdf740ca Mon Sep 17 00:00:00 2001 +From: Ryan VanderMeulen +Date: Mon, 6 Apr 2015 22:59:41 -0400 +Subject: [PATCH] Bug 1149542 - Replace MOZ_ASSERT_UNREACHABLE with MOZ_ASSERT. + r=dholbert, a=bustage + +--- + layout/svg/SVGTextFrame.cpp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp +index 9d331b8..e7b7275 100644 +--- a/layout/svg/SVGTextFrame.cpp ++++ b/layout/svg/SVGTextFrame.cpp +@@ -4333,8 +4333,8 @@ SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, + if (length) { + uint32_t end = aIndex + length; + if (MOZ_UNLIKELY(end > mPositions.Length())) { +- MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " +- "found by iterating content"); ++ MOZ_ASSERT(false, "length of mPositions does not match characters " ++ "found by iterating content"); + return false; + } + if (aForceStartOfChunk) { +@@ -4367,8 +4367,8 @@ SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, + // only if they actually have some text content. + if (HasTextContent(aContent)) { + if (MOZ_UNLIKELY(aIndex >= mPositions.Length())) { +- MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " +- "found by iterating content"); ++ MOZ_ASSERT(false, "length of mPositions does not match characters " ++ "found by iterating content"); + return false; + } + mPositions[aIndex].mPosition = gfxPoint(); +@@ -4394,8 +4394,8 @@ SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, + uint32_t count = GetTextContentLength(aContent); + + if (MOZ_UNLIKELY(aIndex + count > mPositions.Length())) { +- MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " +- "found by iterating content"); ++ MOZ_ASSERT(false, "length of mPositions does not match characters " ++ "found by iterating content"); + return false; + } + +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch b/gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch new file mode 100644 index 0000000000..9e52759ae8 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch @@ -0,0 +1,102 @@ +From 2b1c90da3e849e1c9d7457658290aa8eb01d0fa9 Mon Sep 17 00:00:00 2001 +From: Mats Palmgren +Date: Thu, 16 Apr 2015 09:04:19 +0000 +Subject: [PATCH] Bug 1153478 - Part 1: Add nsInlineFrame::StealFrame and make + it deal with being called on the wrong parent for aChild (due to lazy + reparenting). r=roc, a=sledru + +--- + layout/generic/nsContainerFrame.cpp | 7 +++---- + layout/generic/nsInlineFrame.cpp | 39 +++++++++++++++++++++++++++++++++++++ + layout/generic/nsInlineFrame.h | 4 +++- + 3 files changed, 45 insertions(+), 5 deletions(-) + +diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp +index 3ffcba7..34878af 100644 +--- a/layout/generic/nsContainerFrame.cpp ++++ b/layout/generic/nsContainerFrame.cpp +@@ -172,13 +172,12 @@ nsContainerFrame::RemoveFrame(ChildListID aListID, + nsIPresShell* shell = PresContext()->PresShell(); + nsContainerFrame* lastParent = nullptr; + while (aOldFrame) { +- //XXXfr probably should use StealFrame here. I'm not sure if we need to +- // check the overflow lists atm, but we'll need a prescontext lookup +- // for overflow containers once we can split abspos elements with +- // inline containing blocks. + nsIFrame* oldFrameNextContinuation = aOldFrame->GetNextContinuation(); + nsContainerFrame* parent = + static_cast(aOldFrame->GetParent()); ++ // Please note that 'parent' may not actually be where 'aOldFrame' lives. ++ // We really MUST use StealFrame() and nothing else here. ++ // @see nsInlineFrame::StealFrame for details. + parent->StealFrame(aOldFrame, true); + aOldFrame->Destroy(); + aOldFrame = oldFrameNextContinuation; +diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp +index 526041e..a392a15 100644 +--- a/layout/generic/nsInlineFrame.cpp ++++ b/layout/generic/nsInlineFrame.cpp +@@ -172,6 +172,45 @@ nsInlineFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, + return CONTINUE; + } + ++nsresult ++nsInlineFrame::StealFrame(nsIFrame* aChild, ++ bool aForceNormal) ++{ ++ if (aChild->HasAnyStateBits(NS_FRAME_IS_OVERFLOW_CONTAINER) && ++ !aForceNormal) { ++ return nsContainerFrame::StealFrame(aChild, aForceNormal); ++ } ++ ++ nsInlineFrame* parent = this; ++ bool removed = false; ++ do { ++ removed = parent->mFrames.StartRemoveFrame(aChild); ++ if (removed) { ++ break; ++ } ++ ++ // We didn't find the child in our principal child list. ++ // Maybe it's on the overflow list? ++ nsFrameList* frameList = parent->GetOverflowFrames(); ++ if (frameList) { ++ removed = frameList->ContinueRemoveFrame(aChild); ++ if (frameList->IsEmpty()) { ++ parent->DestroyOverflowList(); ++ } ++ if (removed) { ++ break; ++ } ++ } ++ ++ // Due to our "lazy reparenting" optimization 'aChild' might not actually ++ // be on any of our child lists, but instead in one of our next-in-flows. ++ parent = static_cast(parent->GetNextInFlow()); ++ } while (parent); ++ ++ MOZ_ASSERT(removed, "nsInlineFrame::StealFrame: can't find aChild"); ++ return removed ? NS_OK : NS_ERROR_UNEXPECTED; ++} ++ + void + nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, + const nsRect& aDirtyRect, +diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h +index 1a9899e..3e49241 100644 +--- a/layout/generic/nsInlineFrame.h ++++ b/layout/generic/nsInlineFrame.h +@@ -61,7 +61,9 @@ public: + + virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset, + bool aRespectClusters = true) MOZ_OVERRIDE; +- ++ ++ virtual nsresult StealFrame(nsIFrame* aChild, bool aForceNormal) MOZ_OVERRIDE; ++ + // nsIHTMLReflow overrides + virtual void AddInlineMinWidth(nsRenderingContext *aRenderingContext, + InlineMinWidthData *aData) MOZ_OVERRIDE; +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch b/gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch new file mode 100644 index 0000000000..b1f2adde47 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch @@ -0,0 +1,47 @@ +From d84ed2990dd2304fef752213f1908280ff24d77c Mon Sep 17 00:00:00 2001 +From: Mats Palmgren +Date: Thu, 16 Apr 2015 09:04:19 +0000 +Subject: [PATCH] Bug 1153478 - Part 2: Remove useless assertions. r=roc, + a=sledru + +--- + layout/generic/nsContainerFrame.cpp | 1 - + layout/generic/nsInlineFrame.cpp | 3 --- + 2 files changed, 4 deletions(-) + +diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp +index 34878af..b95bddd 100644 +--- a/layout/generic/nsContainerFrame.cpp ++++ b/layout/generic/nsContainerFrame.cpp +@@ -1516,7 +1516,6 @@ nsContainerFrame::DrainSelfOverflowList() + { + AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); + if (overflowFrames) { +- NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames"); + mFrames.AppendFrames(nullptr, *overflowFrames); + return true; + } +diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp +index a392a15..e0922bb 100644 +--- a/layout/generic/nsInlineFrame.cpp ++++ b/layout/generic/nsInlineFrame.cpp +@@ -449,7 +449,6 @@ nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags, + { + AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); + if (overflowFrames) { +- NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames"); + // The frames on our own overflowlist may have been pushed by a + // previous lazilySetParentPointer Reflow so we need to ensure the + // correct parent pointer. This is sometimes skipped by Reflow. +@@ -1157,8 +1156,6 @@ nsFirstLineFrame::DrainSelfOverflowList() + { + AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); + if (overflowFrames) { +- NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames"); +- + bool result = !overflowFrames->IsEmpty(); + const nsFrameList::Slice& newFrames = + mFrames.AppendFrames(nullptr, *overflowFrames); +-- +2.2.1 + diff --git a/gnu/packages/patches/icecat-CVE-2015-2716.patch b/gnu/packages/patches/icecat-CVE-2015-2716.patch new file mode 100644 index 0000000000..ce036a0921 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2015-2716.patch @@ -0,0 +1,62 @@ +From 9dcb4563847cb6e2a8112dca03d2684907f96313 Mon Sep 17 00:00:00 2001 +From: Eric Rahm +Date: Fri, 10 Apr 2015 15:50:23 -0700 +Subject: [PATCH] Bug 1140537 - Sanity check size calculations. r=peterv, + a=abillings + +--- + parser/expat/lib/xmlparse.c | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/parser/expat/lib/xmlparse.c b/parser/expat/lib/xmlparse.c +index 70acf1a..436b735 100644 +--- a/parser/expat/lib/xmlparse.c ++++ b/parser/expat/lib/xmlparse.c +@@ -1651,6 +1651,12 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal) + void * XMLCALL + XML_GetBuffer(XML_Parser parser, int len) + { ++/* BEGIN MOZILLA CHANGE (sanity check len) */ ++ if (len < 0) { ++ errorCode = XML_ERROR_NO_MEMORY; ++ return NULL; ++ } ++/* END MOZILLA CHANGE */ + switch (ps_parsing) { + case XML_SUSPENDED: + errorCode = XML_ERROR_SUSPENDED; +@@ -1662,8 +1668,13 @@ XML_GetBuffer(XML_Parser parser, int len) + } + + if (len > bufferLim - bufferEnd) { +- /* FIXME avoid integer overflow */ + int neededSize = len + (int)(bufferEnd - bufferPtr); ++/* BEGIN MOZILLA CHANGE (sanity check neededSize) */ ++ if (neededSize < 0) { ++ errorCode = XML_ERROR_NO_MEMORY; ++ return NULL; ++ } ++/* END MOZILLA CHANGE */ + #ifdef XML_CONTEXT_BYTES + int keep = (int)(bufferPtr - buffer); + +@@ -1692,7 +1703,15 @@ XML_GetBuffer(XML_Parser parser, int len) + bufferSize = INIT_BUFFER_SIZE; + do { + bufferSize *= 2; +- } while (bufferSize < neededSize); ++/* BEGIN MOZILLA CHANGE (prevent infinite loop on overflow) */ ++ } while (bufferSize < neededSize && bufferSize > 0); ++/* END MOZILLA CHANGE */ ++/* BEGIN MOZILLA CHANGE (sanity check bufferSize) */ ++ if (bufferSize <= 0) { ++ errorCode = XML_ERROR_NO_MEMORY; ++ return NULL; ++ } ++/* END MOZILLA CHANGE */ + newBuf = (char *)MALLOC(bufferSize); + if (newBuf == 0) { + errorCode = XML_ERROR_NO_MEMORY; +-- +2.2.1 + -- cgit v1.2.3 From f6708fcdb2b6977e0a2a7449aa917dc373545455 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 14 May 2015 19:01:26 -0400 Subject: gnu: qemu: Update to 2.3.0; add fix for CVE-2015-3456. * gnu/packages/patches/qemu-CVE-2015-3456.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/qemu.scm (qemu-headless): Update to 2.3.0. Add patch. --- gnu-system.am | 1 + gnu/packages/patches/qemu-CVE-2015-3456.patch | 85 +++++++++++++++++++++++++++ gnu/packages/qemu.scm | 6 +- 3 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/qemu-CVE-2015-3456.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index e25eae59fe..5ba48d15d2 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -536,6 +536,7 @@ dist_patch_DATA = \ gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch \ gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ + gnu/packages/patches/qemu-CVE-2015-3456.patch \ gnu/packages/patches/qt4-ldflags.patch \ gnu/packages/patches/qt4-tests.patch \ gnu/packages/patches/qt5-conflicting-typedefs.patch \ diff --git a/gnu/packages/patches/qemu-CVE-2015-3456.patch b/gnu/packages/patches/qemu-CVE-2015-3456.patch new file mode 100644 index 0000000000..9514f7c3e5 --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2015-3456.patch @@ -0,0 +1,85 @@ +From e907746266721f305d67bc0718795fedee2e824c Mon Sep 17 00:00:00 2001 +From: Petr Matousek +Date: Wed, 6 May 2015 09:48:59 +0200 +Subject: [PATCH] fdc: force the fifo access to be in bounds of the allocated + buffer + +During processing of certain commands such as FD_CMD_READ_ID and +FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could +get out of bounds leading to memory corruption with values coming +from the guest. + +Fix this by making sure that the index is always bounded by the +allocated memory. + +This is CVE-2015-3456. + +Signed-off-by: Petr Matousek +Reviewed-by: John Snow +Signed-off-by: John Snow +--- + hw/block/fdc.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/hw/block/fdc.c b/hw/block/fdc.c +index f72a392..d8a8edd 100644 +--- a/hw/block/fdc.c ++++ b/hw/block/fdc.c +@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) + { + FDrive *cur_drv; + uint32_t retval = 0; +- int pos; ++ uint32_t pos; + + cur_drv = get_cur_drv(fdctrl); + fdctrl->dsr &= ~FD_DSR_PWRDOWN; +@@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) + return 0; + } + pos = fdctrl->data_pos; ++ pos %= FD_SECTOR_LEN; + if (fdctrl->msr & FD_MSR_NONDMA) { +- pos %= FD_SECTOR_LEN; + if (pos == 0) { + if (fdctrl->data_pos != 0) + if (!fdctrl_seek_to_next_sect(fdctrl, cur_drv)) { +@@ -1852,10 +1852,13 @@ static void fdctrl_handle_option(FDCtrl *fdctrl, int direction) + static void fdctrl_handle_drive_specification_command(FDCtrl *fdctrl, int direction) + { + FDrive *cur_drv = get_cur_drv(fdctrl); ++ uint32_t pos; + +- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80) { ++ pos = fdctrl->data_pos - 1; ++ pos %= FD_SECTOR_LEN; ++ if (fdctrl->fifo[pos] & 0x80) { + /* Command parameters done */ +- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x40) { ++ if (fdctrl->fifo[pos] & 0x40) { + fdctrl->fifo[0] = fdctrl->fifo[1]; + fdctrl->fifo[2] = 0; + fdctrl->fifo[3] = 0; +@@ -1955,7 +1958,7 @@ static uint8_t command_to_handler[256]; + static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value) + { + FDrive *cur_drv; +- int pos; ++ uint32_t pos; + + /* Reset mode */ + if (!(fdctrl->dor & FD_DOR_nRESET)) { +@@ -2004,7 +2007,9 @@ static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value) + } + + FLOPPY_DPRINTF("%s: %02x\n", __func__, value); +- fdctrl->fifo[fdctrl->data_pos++] = value; ++ pos = fdctrl->data_pos++; ++ pos %= FD_SECTOR_LEN; ++ fdctrl->fifo[pos] = value; + if (fdctrl->data_pos == fdctrl->data_len) { + /* We now have all parameters + * and will be able to treat the command +-- +2.2.1 + diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm index 77aeecf40c..e9a2c08743 100644 --- a/gnu/packages/qemu.scm +++ b/gnu/packages/qemu.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014 Ludovic Courtès +;;; Copyright © 2015 Mark H Weaver ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,14 +43,15 @@ ;; This is QEMU without GUI support. (package (name "qemu-headless") - (version "2.2.0") + (version "2.3.0") (source (origin (method url-fetch) (uri (string-append "http://wiki.qemu-project.org/download/qemu-" version ".tar.bz2")) (sha256 (base32 - "1703c3scl5n07gmpilg7g2xzyxnr7jczxgx6nn4m8kv9gin9p35n")))) + "120m53c3p28qxmfzllicjzr8syjv6v4d9rsyrgkp7gnmcgvvgfmn")) + (patches (list (search-patch "qemu-CVE-2015-3456.patch"))))) (build-system gnu-build-system) (arguments '(#:phases (alist-replace -- cgit v1.2.3 From 3a6fb858ad95dd422b2519d5862d5db61deeb2a5 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 20 May 2015 14:55:26 -0400 Subject: gnu: bitlbee: Update to 3.4. * gnu/packages/patches/bitlbee-configure-doc-fix.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/messaging.scm (bitlbee): Update to 3.4. Add patch. [inputs]: Remove 'zlib'. --- gnu-system.am | 1 + gnu/packages/messaging.scm | 6 +++--- gnu/packages/patches/bitlbee-configure-doc-fix.patch | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/bitlbee-configure-doc-fix.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 5ba48d15d2..a26686b81b 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -387,6 +387,7 @@ dist_patch_DATA = \ gnu/packages/patches/bigloo-gc-shebangs.patch \ gnu/packages/patches/binutils-ld-new-dtags.patch \ gnu/packages/patches/binutils-loongson-workaround.patch \ + gnu/packages/patches/bitlbee-configure-doc-fix.patch \ gnu/packages/patches/calibre-drop-unrar.patch \ gnu/packages/patches/calibre-no-updates-dialog.patch \ gnu/packages/patches/cdparanoia-fpic.patch \ diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index fd857b1ec3..99c5bdb0ff 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -86,20 +86,20 @@ providing: (define-public bitlbee (package (name "bitlbee") - (version "3.2.2") + (version "3.4") (source (origin (method url-fetch) (uri (string-append "http://get.bitlbee.org/src/bitlbee-" version ".tar.gz")) (sha256 - (base32 "13jmcxxgli82wb2n4hs091159xk8rgh7nb02f478lgpjh6996f5s")))) + (base32 "0plx4dryf8i6hz7vghg84z5f6w6rkw1l8ckl4c4wh5zxpd3ddfnf")) + (patches (list (search-patch "bitlbee-configure-doc-fix.patch"))))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("check" ,check))) (inputs `(("glib" ,glib) ("libotr" ,libotr) ("gnutls" ,gnutls) - ("zlib" ,zlib) ; Needed to satisfy "pkg-config --exists gnutls" ("python" ,python-2) ("perl" ,perl))) (arguments diff --git a/gnu/packages/patches/bitlbee-configure-doc-fix.patch b/gnu/packages/patches/bitlbee-configure-doc-fix.patch new file mode 100644 index 0000000000..ade0b7f25c --- /dev/null +++ b/gnu/packages/patches/bitlbee-configure-doc-fix.patch @@ -0,0 +1,15 @@ +Fix the check for the prebuilt helpfile when xsltproc is not available. + +--- bitlbee-3.4/configure.orig 2015-03-25 18:09:10.000000000 -0400 ++++ bitlbee-3.4/configure 2015-05-20 14:51:33.627975970 -0400 +@@ -650,8 +650,8 @@ + + if [ "$doc" = "1" ]; then + if [ ! -e doc/user-guide/help.txt ] && \ +- ! type xmlto > /dev/null 2> /dev/null || \ +- ! type xsltproc > /dev/null 2> /dev/null ++ (! type xmlto > /dev/null 2> /dev/null || \ ++ ! type xsltproc > /dev/null 2> /dev/null) + then + echo + echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.' -- cgit v1.2.3 From 9099e881828fd242cc26054c0f33670c46154d96 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 19 May 2015 11:53:47 +0200 Subject: gnu: r: Apply patch to fix linking against R. * gnu/packages/patches/r-fix-15899.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/statistics.scm (r)[source]: Use it. --- gnu-system.am | 1 + gnu/packages/patches/r-fix-15899.patch | 17 +++++++++++++++++ gnu/packages/statistics.scm | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/r-fix-15899.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index a26686b81b..297c8bcf6a 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -542,6 +542,7 @@ dist_patch_DATA = \ gnu/packages/patches/qt4-tests.patch \ gnu/packages/patches/qt5-conflicting-typedefs.patch \ gnu/packages/patches/qt5-runpath.patch \ + gnu/packages/patches/r-fix-15899.patch \ gnu/packages/patches/ratpoison-shell.patch \ gnu/packages/patches/readline-link-ncurses.patch \ gnu/packages/patches/ripperx-libm.patch \ diff --git a/gnu/packages/patches/r-fix-15899.patch b/gnu/packages/patches/r-fix-15899.patch new file mode 100644 index 0000000000..40593d34e6 --- /dev/null +++ b/gnu/packages/patches/r-fix-15899.patch @@ -0,0 +1,17 @@ +Without the "extern" keyword external applications linking against R (such as +Shogun, for example) might not be linkable. + +See https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15899 for details +about this bug. + +--- a/src/include/Rinterface.h (revision 66251) ++++ b/src/include/Rinterface.h (working copy) +@@ -84,7 +84,7 @@ + void fpu_setup(Rboolean); + + /* in unix/system.c */ +-int R_running_as_main_program; ++extern int R_running_as_main_program; + + #ifdef CSTACK_DEFNS + /* duplicating Defn.h */ diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 722e0dfa49..9408705d5e 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -50,7 +50,8 @@ version ".tar.gz")) (sha256 (base32 - "0dagyqgvi8i3nw158qi2zpwm04s4ffzvnmk5niaksvxs30zrbbpm")))) + "0dagyqgvi8i3nw158qi2zpwm04s4ffzvnmk5niaksvxs30zrbbpm")) + (patches (list (search-patch "r-fix-15899.patch"))))) (build-system gnu-build-system) (arguments `(#:make-flags -- cgit v1.2.3 From 4de02f36ac00af722c8f693ab5823fc1a870d58f Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 22 May 2015 00:09:26 -0400 Subject: gnu: fuse: Add fix for CVE-2015-3202. * gnu/packages/patches/fuse-CVE-2015-3202.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/linux.scm (fuse): Add patch. --- gnu-system.am | 1 + gnu/packages/linux.scm | 3 +- gnu/packages/patches/fuse-CVE-2015-3202.patch | 65 +++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/fuse-CVE-2015-3202.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 297c8bcf6a..23113bb16c 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -421,6 +421,7 @@ dist_patch_DATA = \ gnu/packages/patches/flashrom-use-libftdi1.patch \ gnu/packages/patches/flex-bison-tests.patch \ gnu/packages/patches/fltk-shared-lib-defines.patch \ + gnu/packages/patches/fuse-CVE-2015-3202.patch \ gnu/packages/patches/gawk-shell.patch \ gnu/packages/patches/gcc-arm-link-spec-fix.patch \ gnu/packages/patches/gcc-cross-environment-variables.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index b5f4b55c6b..26e9aa9000 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1212,7 +1212,8 @@ processes currently causing I/O.") version ".tar.gz")) (sha256 (base32 - "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb")))) + "071r6xjgssy8vwdn6m28qq1bqxsd2bphcd2mzhq0grf5ybm87sqb")) + (patches (list (search-patch "fuse-CVE-2015-3202.patch"))))) (build-system gnu-build-system) (inputs `(("util-linux" ,util-linux))) (arguments diff --git a/gnu/packages/patches/fuse-CVE-2015-3202.patch b/gnu/packages/patches/fuse-CVE-2015-3202.patch new file mode 100644 index 0000000000..7c64de7683 --- /dev/null +++ b/gnu/packages/patches/fuse-CVE-2015-3202.patch @@ -0,0 +1,65 @@ +The following patch was copied from Debian. + +Description: Fix CVE-2015-3202 + Missing scrubbing of the environment before executing a mount or umount + of a filesystem. +Origin: upstream +Author: Miklos Szeredi +Last-Update: 2015-05-19 + +--- + lib/mount_util.c | 23 +++++++++++++++++------ + 1 file changed, 17 insertions(+), 6 deletions(-) + +--- a/lib/mount_util.c ++++ b/lib/mount_util.c +@@ -95,10 +95,12 @@ static int add_mount(const char *prognam + goto out_restore; + } + if (res == 0) { ++ char *env = NULL; ++ + sigprocmask(SIG_SETMASK, &oldmask, NULL); + setuid(geteuid()); +- execl("/bin/mount", "/bin/mount", "--no-canonicalize", "-i", +- "-f", "-t", type, "-o", opts, fsname, mnt, NULL); ++ execle("/bin/mount", "/bin/mount", "--no-canonicalize", "-i", ++ "-f", "-t", type, "-o", opts, fsname, mnt, NULL, &env); + fprintf(stderr, "%s: failed to execute /bin/mount: %s\n", + progname, strerror(errno)); + exit(1); +@@ -146,10 +148,17 @@ static int exec_umount(const char *progn + goto out_restore; + } + if (res == 0) { ++ char *env = NULL; ++ + sigprocmask(SIG_SETMASK, &oldmask, NULL); + setuid(geteuid()); +- execl("/bin/umount", "/bin/umount", "-i", rel_mnt, +- lazy ? "-l" : NULL, NULL); ++ if (lazy) { ++ execle("/bin/umount", "/bin/umount", "-i", rel_mnt, ++ "-l", NULL, &env); ++ } else { ++ execle("/bin/umount", "/bin/umount", "-i", rel_mnt, ++ NULL, &env); ++ } + fprintf(stderr, "%s: failed to execute /bin/umount: %s\n", + progname, strerror(errno)); + exit(1); +@@ -205,10 +214,12 @@ static int remove_mount(const char *prog + goto out_restore; + } + if (res == 0) { ++ char *env = NULL; ++ + sigprocmask(SIG_SETMASK, &oldmask, NULL); + setuid(geteuid()); +- execl("/bin/umount", "/bin/umount", "--no-canonicalize", "-i", +- "--fake", mnt, NULL); ++ execle("/bin/umount", "/bin/umount", "--no-canonicalize", "-i", ++ "--fake", mnt, NULL, &env); + fprintf(stderr, "%s: failed to execute /bin/umount: %s\n", + progname, strerror(errno)); + exit(1); -- cgit v1.2.3 From 66e3eff1e31c4483aeb7a96ada8ea378fdc49e51 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 21 May 2015 15:43:25 +0200 Subject: gnu: Add rsem. * gnu/packages/bioinformatics.scm (rsem): New variable. * gnu/packages/patches/rsem-makefile.patch: New file. --- gnu/packages/bioinformatics.scm | 78 ++++ gnu/packages/patches/rsem-makefile.patch | 682 +++++++++++++++++++++++++++++++ 2 files changed, 760 insertions(+) create mode 100644 gnu/packages/patches/rsem-makefile.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 1c5a5c2eeb..b29ca67dbd 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -1013,6 +1013,84 @@ files and writing bioinformatics applications.") generated using the PacBio Iso-Seq protocol.") (license license:bsd-3)))) +(define-public rsem + (package + (name "rsem") + (version "1.2.20") + (source + (origin + (method url-fetch) + (uri + (string-append "http://deweylab.biostat.wisc.edu/rsem/src/rsem-" + version ".tar.gz")) + (sha256 + (base32 "0nzdc0j0hjllhsd5f2xli95dafm3nawskigs140xzvjk67xh0r9q")) + (patches (list (search-patch "rsem-makefile.patch"))) + (modules '((guix build utils))) + (snippet + '(begin + ;; remove bundled copy of boost + (delete-file-recursively "boost") + #t)))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no "check" target + #:phases + (modify-phases %standard-phases + ;; No "configure" script. + ;; Do not build bundled samtools library. + (replace 'configure + (lambda _ + (substitute* "Makefile" + (("^all : sam/libbam.a") "all : ")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (string-append (assoc-ref outputs "out"))) + (bin (string-append out "/bin/")) + (perl (string-append out "/lib/perl5/site_perl"))) + (mkdir-p bin) + (mkdir-p perl) + (for-each (lambda (file) + (copy-file file + (string-append bin (basename file)))) + (find-files "." "rsem-.*")) + (copy-file "rsem_perl_utils.pm" + (string-append perl "/rsem_perl_utils.pm"))) + #t)) + (add-after + 'install 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (prog) + (wrap-program (string-append out "/bin/" prog) + `("PERL5LIB" ":" prefix + (,(string-append out "/lib/perl5/site_perl"))))) + '("rsem-plot-transcript-wiggles" + "rsem-calculate-expression" + "rsem-generate-ngvector" + "rsem-run-ebseq" + "rsem-prepare-reference"))) + #t))))) + (inputs + `(("boost" ,boost) + ("ncurses" ,ncurses) + ("r" ,r) + ("perl" ,perl) + ("samtools" ,samtools-0.1) + ("zlib" ,zlib))) + (home-page "http://deweylab.biostat.wisc.edu/rsem/") + (synopsis "Estimate gene expression levels from RNA-Seq data") + (description + "RSEM is a software package for estimating gene and isoform expression +levels from RNA-Seq data. The RSEM package provides a user-friendly +interface, supports threads for parallel computation of the EM algorithm, +single-end and paired-end read data, quality scores, variable-length reads and +RSPD estimation. In addition, it provides posterior mean and 95% credibility +interval estimates for expression levels. For visualization, it can generate +BAM and Wiggle files in both transcript-coordinate and genomic-coordinate.") + (license license:gpl3+))) + (define-public rseqc (package (name "rseqc") diff --git a/gnu/packages/patches/rsem-makefile.patch b/gnu/packages/patches/rsem-makefile.patch new file mode 100644 index 0000000000..5481dc685f --- /dev/null +++ b/gnu/packages/patches/rsem-makefile.patch @@ -0,0 +1,682 @@ +This patch simplifies the Makefile, making it much easier to build rsem +without the bundled version of samtools. It has already been submitted +upstream: https://github.com/bli25wisc/RSEM/pull/11 + +From 161894e91a16c7e15af57e4fcfe8cb613711c7fa Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus +Date: Wed, 22 Apr 2015 14:51:07 +0200 +Subject: [PATCH 1/7] remove all headers from Makefile + +--- + Makefile | 95 +++++++++++----------------------------------------------------- + 1 file changed, 16 insertions(+), 79 deletions(-) + +diff --git a/Makefile b/Makefile +index 54e2603..3a55ed8 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,133 +10,70 @@ all : $(PROGRAMS) + sam/libbam.a : + cd sam ; ${MAKE} all + +-Transcript.h : utils.h +- +-Transcripts.h : utils.h my_assert.h Transcript.h +- +-rsem-extract-reference-transcripts : utils.h my_assert.h GTFItem.h Transcript.h Transcripts.h extractRef.cpp ++rsem-extract-reference-transcripts : extractRef.cpp + $(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts + +-rsem-synthesis-reference-transcripts : utils.h my_assert.h Transcript.h Transcripts.h synthesisRef.cpp ++rsem-synthesis-reference-transcripts : synthesisRef.cpp + $(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts + +-BowtieRefSeqPolicy.h : RefSeqPolicy.h +- +-RefSeq.h : utils.h +- +-Refs.h : utils.h RefSeq.h RefSeqPolicy.h PolyARules.h +- +- + rsem-preref : preRef.o + $(CC) preRef.o -o rsem-preref + +-preRef.o : utils.h RefSeq.h Refs.h PolyARules.h RefSeqPolicy.h AlignerRefSeqPolicy.h preRef.cpp ++preRef.o : preRef.cpp + $(CC) $(COFLAGS) preRef.cpp + +- +-SingleRead.h : Read.h +- +-SingleReadQ.h : Read.h +- +-PairedEndRead.h : Read.h SingleRead.h +- +-PairedEndReadQ.h : Read.h SingleReadQ.h +- +- +-PairedEndHit.h : SingleHit.h +- +-HitContainer.h : GroupInfo.h +- +- +-SamParser.h : sam/sam.h sam/bam.h utils.h my_assert.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Transcripts.h +- +- + rsem-parse-alignments : parseIt.o sam/libbam.a + $(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread + +-parseIt.o : utils.h GroupInfo.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h HitContainer.h SamParser.h Transcripts.h sam/sam.h sam/bam.h parseIt.cpp ++parseIt.o : parseIt.cpp + $(CC) -Wall -O2 -c -I. parseIt.cpp + +- +-rsem-build-read-index : utils.h buildReadIndex.cpp ++rsem-build-read-index : buildReadIndex.cpp + $(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index + +- +-simul.h : boost/random.hpp +- +-ReadReader.h : SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h ReadIndex.h +- +-SingleModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h Profile.h NoiseProfile.h ModelParams.h RefSeq.h Refs.h SingleRead.h SingleHit.h ReadReader.h simul.h +- +-SingleQModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h Refs.h SingleReadQ.h SingleHit.h ReadReader.h simul.h +- +-PairedEndModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h Profile.h NoiseProfile.h ModelParams.h RefSeq.h Refs.h SingleRead.h PairedEndRead.h PairedEndHit.h ReadReader.h simul.h +- +-PairedEndQModel.h : utils.h my_assert.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h Refs.h SingleReadQ.h PairedEndReadQ.h PairedEndHit.h ReadReader.h simul.h +- +-HitWrapper.h : HitContainer.h +- +-sam_rsem_aux.h : sam/bam.h +- +-sam_rsem_cvt.h : sam/bam.h Transcript.h Transcripts.h +- +-BamWriter.h : sam/sam.h sam/bam.h sam_rsem_aux.h sam_rsem_cvt.h SingleHit.h PairedEndHit.h HitWrapper.h Transcript.h Transcripts.h +- +-sampling.h : boost/random.hpp +- +-WriteResults.h : utils.h my_assert.h GroupInfo.h Transcript.h Transcripts.h RefSeq.h Refs.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h +- + rsem-run-em : EM.o sam/libbam.a + $(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread + +-EM.o : utils.h my_assert.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h GroupInfo.h HitContainer.h ReadIndex.h ReadReader.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h RefSeqPolicy.h PolyARules.h Profile.h NoiseProfile.h Transcript.h Transcripts.h HitWrapper.h BamWriter.h sam/bam.h sam/sam.h simul.h sam_rsem_aux.h sampling.h boost/random.hpp WriteResults.h EM.cpp ++EM.o : EM.cpp + $(CC) $(COFLAGS) EM.cpp + +-bc_aux.h : sam/bam.h +- +-BamConverter.h : utils.h my_assert.h sam/sam.h sam/bam.h sam_rsem_aux.h sam_rsem_cvt.h bc_aux.h Transcript.h Transcripts.h +- +-rsem-tbam2gbam : utils.h Transcripts.h Transcript.h bc_aux.h BamConverter.h sam/sam.h sam/bam.h sam/libbam.a sam_rsem_aux.h sam_rsem_cvt.h tbam2gbam.cpp sam/libbam.a ++rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a + $(CC) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ + +-rsem-bam2wig : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2wig.cpp ++rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp + $(CC) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + +-rsem-bam2readdepth : utils.h my_assert.h wiggle.h wiggle.o sam/libbam.a bam2readdepth.cpp ++rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp + $(CC) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + +-wiggle.o: sam/bam.h sam/sam.h wiggle.cpp wiggle.h ++wiggle.o: wiggle.cpp + $(CC) $(COFLAGS) wiggle.cpp + + rsem-simulate-reads : simulation.o + $(CC) -o rsem-simulate-reads simulation.o + +-simulation.o : utils.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h RefSeq.h GroupInfo.h Transcript.h Transcripts.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h Profile.h NoiseProfile.h simul.h boost/random.hpp WriteResults.h simulation.cpp ++simulation.o : simulation.cpp + $(CC) $(COFLAGS) simulation.cpp + + rsem-run-gibbs : Gibbs.o + $(CC) -o rsem-run-gibbs Gibbs.o -lpthread + +-#some header files are omitted +-Gibbs.o : utils.h my_assert.h boost/random.hpp sampling.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h RefSeq.h RefSeqPolicy.h PolyARules.h Refs.h GroupInfo.h WriteResults.h Gibbs.cpp ++Gibbs.o : Gibbs.cpp + $(CC) $(COFLAGS) Gibbs.cpp + +-Buffer.h : my_assert.h +- + rsem-calculate-credibility-intervals : calcCI.o + $(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread + +-#some header files are omitted +-calcCI.o : utils.h my_assert.h boost/random.hpp sampling.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h RefSeq.h RefSeqPolicy.h PolyARules.h Refs.h GroupInfo.h WriteResults.h Buffer.h calcCI.cpp ++calcCI.o : calcCI.cpp + $(CC) $(COFLAGS) calcCI.cpp + +-rsem-get-unique : sam/bam.h sam/sam.h getUnique.cpp sam/libbam.a ++rsem-get-unique : getUnique.cpp sam/libbam.a + $(CC) -O3 -Wall getUnique.cpp sam/libbam.a -lz -lpthread -o $@ + +-rsem-sam-validator : sam/bam.h sam/sam.h my_assert.h samValidator.cpp sam/libbam.a ++rsem-sam-validator : samValidator.cpp sam/libbam.a + $(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -lpthread -o $@ + +-rsem-scan-for-paired-end-reads : sam/bam.h sam/sam.h my_assert.h scanForPairedEndReads.cpp sam/libbam.a ++rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a + $(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ + + ebseq : + +From ec136638a727632e20abfaeb65c22c46d15ca8c4 Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus +Date: Wed, 22 Apr 2015 15:06:41 +0200 +Subject: [PATCH 2/7] include current dir, ./sam and ./boost by default + +--- + Makefile | 48 ++++++++++++++++++++++++------------------------ + 1 file changed, 24 insertions(+), 24 deletions(-) + +diff --git a/Makefile b/Makefile +index 3a55ed8..1dd97ca 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + CC = g++ +-CFLAGS = -Wall -c -I. +-COFLAGS = -Wall -O3 -ffast-math -c -I. ++CFLAGS = -Wall -I. -I./sam -I./boost ++COFLAGS = -O3 -ffast-math -c + PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads + + .PHONY : all ebseq clean +@@ -11,70 +11,70 @@ sam/libbam.a : + cd sam ; ${MAKE} all + + rsem-extract-reference-transcripts : extractRef.cpp +- $(CC) -Wall -O3 extractRef.cpp -o rsem-extract-reference-transcripts ++ $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts + + rsem-synthesis-reference-transcripts : synthesisRef.cpp +- $(CC) -Wall -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts ++ $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts + + rsem-preref : preRef.o +- $(CC) preRef.o -o rsem-preref ++ $(CC) $(CFLAGS) preRef.o -o rsem-preref + + preRef.o : preRef.cpp +- $(CC) $(COFLAGS) preRef.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp + + rsem-parse-alignments : parseIt.o sam/libbam.a +- $(CC) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread ++ $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread + + parseIt.o : parseIt.cpp +- $(CC) -Wall -O2 -c -I. parseIt.cpp ++ $(CC) $(CFLAGS) -O2 -c parseIt.cpp + + rsem-build-read-index : buildReadIndex.cpp +- $(CC) -O3 buildReadIndex.cpp -o rsem-build-read-index ++ $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index + + rsem-run-em : EM.o sam/libbam.a +- $(CC) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread ++ $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread + + EM.o : EM.cpp +- $(CC) $(COFLAGS) EM.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) EM.cpp + + rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a +- $(CC) -O3 -Wall tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ + + rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp +- $(CC) -O3 -Wall bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + + rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp +- $(CC) -O3 -Wall bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + + wiggle.o: wiggle.cpp +- $(CC) $(COFLAGS) wiggle.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp + + rsem-simulate-reads : simulation.o +- $(CC) -o rsem-simulate-reads simulation.o ++ $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o + + simulation.o : simulation.cpp +- $(CC) $(COFLAGS) simulation.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp + + rsem-run-gibbs : Gibbs.o +- $(CC) -o rsem-run-gibbs Gibbs.o -lpthread ++ $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread + + Gibbs.o : Gibbs.cpp +- $(CC) $(COFLAGS) Gibbs.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp + + rsem-calculate-credibility-intervals : calcCI.o +- $(CC) -o rsem-calculate-credibility-intervals calcCI.o -lpthread ++ $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread + + calcCI.o : calcCI.cpp +- $(CC) $(COFLAGS) calcCI.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp + + rsem-get-unique : getUnique.cpp sam/libbam.a +- $(CC) -O3 -Wall getUnique.cpp sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@ + + rsem-sam-validator : samValidator.cpp sam/libbam.a +- $(CC) -O3 -Wall samValidator.cpp sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 samValidator.cpp sam/libbam.a -lz -lpthread -o $@ + + rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a +- $(CC) -O3 -Wall scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ + + ebseq : + cd EBSeq ; ${MAKE} all + +From d366614ea50f79fdd93e3c76383ccb6fcdeaa8e0 Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus +Date: Wed, 22 Apr 2015 15:10:49 +0200 +Subject: [PATCH 3/7] separate object rules from rules for executables + +--- + Makefile | 50 ++++++++++++++++++++++++++------------------------ + 1 file changed, 26 insertions(+), 24 deletions(-) + +diff --git a/Makefile b/Makefile +index 1dd97ca..ae4de3b 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,6 +10,32 @@ all : $(PROGRAMS) + sam/libbam.a : + cd sam ; ${MAKE} all + ++ebseq : ++ cd EBSeq ; ${MAKE} all ++ ++ ++calcCI.o : calcCI.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp ++ ++EM.o : EM.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) EM.cpp ++ ++Gibbs.o : Gibbs.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp ++ ++preRef.o : preRef.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp ++ ++parseIt.o : parseIt.cpp ++ $(CC) $(CFLAGS) -O2 -c parseIt.cpp ++ ++simulation.o : simulation.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp ++ ++wiggle.o: wiggle.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp ++ ++ + rsem-extract-reference-transcripts : extractRef.cpp + $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts + +@@ -19,24 +45,15 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp + rsem-preref : preRef.o + $(CC) $(CFLAGS) preRef.o -o rsem-preref + +-preRef.o : preRef.cpp +- $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp +- + rsem-parse-alignments : parseIt.o sam/libbam.a + $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread + +-parseIt.o : parseIt.cpp +- $(CC) $(CFLAGS) -O2 -c parseIt.cpp +- + rsem-build-read-index : buildReadIndex.cpp + $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index + + rsem-run-em : EM.o sam/libbam.a + $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread + +-EM.o : EM.cpp +- $(CC) $(CFLAGS) $(COFLAGS) EM.cpp +- + rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a + $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ + +@@ -46,27 +63,15 @@ rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp + rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp + $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ + +-wiggle.o: wiggle.cpp +- $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp +- + rsem-simulate-reads : simulation.o + $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o + +-simulation.o : simulation.cpp +- $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp +- + rsem-run-gibbs : Gibbs.o + $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread + +-Gibbs.o : Gibbs.cpp +- $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp +- + rsem-calculate-credibility-intervals : calcCI.o + $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread + +-calcCI.o : calcCI.cpp +- $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp +- + rsem-get-unique : getUnique.cpp sam/libbam.a + $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@ + +@@ -76,9 +81,6 @@ rsem-sam-validator : samValidator.cpp sam/libbam.a + rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a + $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ + +-ebseq : +- cd EBSeq ; ${MAKE} all +- + clean : + rm -f *.o *~ $(PROGRAMS) + cd sam ; ${MAKE} clean + +From 6ba1c33cccdf7c8e7df7a3189e7db204be3b1e8d Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus +Date: Wed, 22 Apr 2015 15:28:30 +0200 +Subject: [PATCH 4/7] add ./sam to library directories, link with -lbam + +--- + Makefile | 36 ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +diff --git a/Makefile b/Makefile +index ae4de3b..a87cc4d 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,11 +1,11 @@ + CC = g++ +-CFLAGS = -Wall -I. -I./sam -I./boost ++CFLAGS = -Wall -I. -I./sam -I./boost -L./sam + COFLAGS = -O3 -ffast-math -c + PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads + + .PHONY : all ebseq clean + +-all : $(PROGRAMS) ++all : sam/libbam.a $(PROGRAMS) + + sam/libbam.a : + cd sam ; ${MAKE} all +@@ -45,23 +45,23 @@ rsem-synthesis-reference-transcripts : synthesisRef.cpp + rsem-preref : preRef.o + $(CC) $(CFLAGS) preRef.o -o rsem-preref + +-rsem-parse-alignments : parseIt.o sam/libbam.a +- $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o sam/libbam.a -lz -lpthread ++rsem-parse-alignments : parseIt.o ++ $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o -lbam -lz -lpthread + + rsem-build-read-index : buildReadIndex.cpp + $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index + +-rsem-run-em : EM.o sam/libbam.a +- $(CC) $(CFLAGS) -o rsem-run-em EM.o sam/libbam.a -lz -lpthread ++rsem-run-em : EM.o ++ $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread + +-rsem-tbam2gbam : tbam2gbam.cpp sam/libbam.a +- $(CC) $(CFLAGS) -O3 tbam2gbam.cpp sam/libbam.a -lz -lpthread -o $@ ++rsem-tbam2gbam : tbam2gbam.cpp ++ $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@ + +-rsem-bam2wig : wiggle.o sam/libbam.a bam2wig.cpp +- $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ ++rsem-bam2wig : wiggle.o bam2wig.cpp ++ $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o -lbam -lz -lpthread -o $@ + +-rsem-bam2readdepth : wiggle.o sam/libbam.a bam2readdepth.cpp +- $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o sam/libbam.a -lz -lpthread -o $@ ++rsem-bam2readdepth : wiggle.o bam2readdepth.cpp ++ $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@ + + rsem-simulate-reads : simulation.o + $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o +@@ -72,14 +72,14 @@ rsem-run-gibbs : Gibbs.o + rsem-calculate-credibility-intervals : calcCI.o + $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread + +-rsem-get-unique : getUnique.cpp sam/libbam.a +- $(CC) $(CFLAGS) -O3 getUnique.cpp sam/libbam.a -lz -lpthread -o $@ ++rsem-get-unique : getUnique.cpp ++ $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@ + +-rsem-sam-validator : samValidator.cpp sam/libbam.a +- $(CC) $(CFLAGS) -O3 samValidator.cpp sam/libbam.a -lz -lpthread -o $@ ++rsem-sam-validator : samValidator.cpp ++ $(CC) $(CFLAGS) -O3 samValidator.cpp -lbam -lz -lpthread -o $@ + +-rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp sam/libbam.a +- $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp sam/libbam.a -lz -lpthread -o $@ ++rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp ++ $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp -lbam -lz -lpthread -o $@ + + clean : + rm -f *.o *~ $(PROGRAMS) + +From 5402b88c269df79ee245c1c59e15f3c8282a0220 Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus +Date: Wed, 22 Apr 2015 15:33:02 +0200 +Subject: [PATCH 5/7] do not repeat target name, use $@ instead + +--- + Makefile | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/Makefile b/Makefile +index a87cc4d..7ec90a3 100644 +--- a/Makefile ++++ b/Makefile +@@ -37,22 +37,22 @@ wiggle.o: wiggle.cpp + + + rsem-extract-reference-transcripts : extractRef.cpp +- $(CC) $(CFLAGS) -O3 extractRef.cpp -o rsem-extract-reference-transcripts ++ $(CC) $(CFLAGS) -O3 extractRef.cpp -o $@ + + rsem-synthesis-reference-transcripts : synthesisRef.cpp +- $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o rsem-synthesis-reference-transcripts ++ $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o $@ + + rsem-preref : preRef.o +- $(CC) $(CFLAGS) preRef.o -o rsem-preref ++ $(CC) $(CFLAGS) preRef.o -o $@ + + rsem-parse-alignments : parseIt.o +- $(CC) $(CFLAGS) -o rsem-parse-alignments parseIt.o -lbam -lz -lpthread ++ $(CC) $(CFLAGS) -o $@ parseIt.o -lbam -lz -lpthread + + rsem-build-read-index : buildReadIndex.cpp +- $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o rsem-build-read-index ++ $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o $@ + + rsem-run-em : EM.o +- $(CC) $(CFLAGS) -o rsem-run-em EM.o -lbam -lz -lpthread ++ $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread + + rsem-tbam2gbam : tbam2gbam.cpp + $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@ +@@ -64,13 +64,13 @@ rsem-bam2readdepth : wiggle.o bam2readdepth.cpp + $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@ + + rsem-simulate-reads : simulation.o +- $(CC) $(CFLAGS) -o rsem-simulate-reads simulation.o ++ $(CC) $(CFLAGS) -o $@ simulation.o + + rsem-run-gibbs : Gibbs.o +- $(CC) $(CFLAGS) -o rsem-run-gibbs Gibbs.o -lpthread ++ $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread + + rsem-calculate-credibility-intervals : calcCI.o +- $(CC) $(CFLAGS) -o rsem-calculate-credibility-intervals calcCI.o -lpthread ++ $(CC) $(CFLAGS) -o $@ calcCI.o -lpthread + + rsem-get-unique : getUnique.cpp + $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@ + +From f60784bc7aa303cc825bd87dd3f5d7d26c51bded Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus +Date: Wed, 22 Apr 2015 15:44:53 +0200 +Subject: [PATCH 6/7] use automatic variables to refer to prerequisites + +--- + Makefile | 44 ++++++++++++++++++++++---------------------- + 1 file changed, 22 insertions(+), 22 deletions(-) + +diff --git a/Makefile b/Makefile +index 7ec90a3..6540d81 100644 +--- a/Makefile ++++ b/Makefile +@@ -15,71 +15,71 @@ ebseq : + + + calcCI.o : calcCI.cpp +- $(CC) $(CFLAGS) $(COFLAGS) calcCI.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + EM.o : EM.cpp +- $(CC) $(CFLAGS) $(COFLAGS) EM.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + Gibbs.o : Gibbs.cpp +- $(CC) $(CFLAGS) $(COFLAGS) Gibbs.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + preRef.o : preRef.cpp +- $(CC) $(CFLAGS) $(COFLAGS) preRef.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + parseIt.o : parseIt.cpp +- $(CC) $(CFLAGS) -O2 -c parseIt.cpp ++ $(CC) $(CFLAGS) -O2 -c $< + + simulation.o : simulation.cpp +- $(CC) $(CFLAGS) $(COFLAGS) simulation.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + wiggle.o: wiggle.cpp +- $(CC) $(CFLAGS) $(COFLAGS) wiggle.cpp ++ $(CC) $(CFLAGS) $(COFLAGS) $< + + + rsem-extract-reference-transcripts : extractRef.cpp +- $(CC) $(CFLAGS) -O3 extractRef.cpp -o $@ ++ $(CC) $(CFLAGS) -O3 $< -o $@ + + rsem-synthesis-reference-transcripts : synthesisRef.cpp +- $(CC) $(CFLAGS) -O3 synthesisRef.cpp -o $@ ++ $(CC) $(CFLAGS) -O3 $< -o $@ + + rsem-preref : preRef.o +- $(CC) $(CFLAGS) preRef.o -o $@ ++ $(CC) $(CFLAGS) $< -o $@ + + rsem-parse-alignments : parseIt.o +- $(CC) $(CFLAGS) -o $@ parseIt.o -lbam -lz -lpthread ++ $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread + + rsem-build-read-index : buildReadIndex.cpp +- $(CC) $(CFLAGS) -O3 buildReadIndex.cpp -o $@ ++ $(CC) $(CFLAGS) -O3 $< -o $@ + + rsem-run-em : EM.o +- $(CC) $(CFLAGS) -o $@ EM.o -lbam -lz -lpthread ++ $(CC) $(CFLAGS) -o $@ $< -lbam -lz -lpthread + + rsem-tbam2gbam : tbam2gbam.cpp +- $(CC) $(CFLAGS) -O3 tbam2gbam.cpp -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@ + + rsem-bam2wig : wiggle.o bam2wig.cpp +- $(CC) $(CFLAGS) -O3 bam2wig.cpp wiggle.o -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $^ -lbam -lz -lpthread -o $@ + + rsem-bam2readdepth : wiggle.o bam2readdepth.cpp +- $(CC) $(CFLAGS) -O3 bam2readdepth.cpp wiggle.o -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $^ -lbam -lz -lpthread -o $@ + + rsem-simulate-reads : simulation.o +- $(CC) $(CFLAGS) -o $@ simulation.o ++ $(CC) $(CFLAGS) -o $@ $< + + rsem-run-gibbs : Gibbs.o +- $(CC) $(CFLAGS) -o $@ Gibbs.o -lpthread ++ $(CC) $(CFLAGS) -o $@ $< -lpthread + + rsem-calculate-credibility-intervals : calcCI.o +- $(CC) $(CFLAGS) -o $@ calcCI.o -lpthread ++ $(CC) $(CFLAGS) -o $@ $< -lpthread + + rsem-get-unique : getUnique.cpp +- $(CC) $(CFLAGS) -O3 getUnique.cpp -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@ + + rsem-sam-validator : samValidator.cpp +- $(CC) $(CFLAGS) -O3 samValidator.cpp -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@ + + rsem-scan-for-paired-end-reads : scanForPairedEndReads.cpp +- $(CC) $(CFLAGS) -O3 scanForPairedEndReads.cpp -lbam -lz -lpthread -o $@ ++ $(CC) $(CFLAGS) -O3 $< -lbam -lz -lpthread -o $@ + + clean : + rm -f *.o *~ $(PROGRAMS) + +From 0cf9721077f67fb4ca15fdc59cbfbf24a944debd Mon Sep 17 00:00:00 2001 +From: Ricardo Wurmus +Date: Wed, 22 Apr 2015 15:49:19 +0200 +Subject: [PATCH 7/7] split long line + +--- + Makefile | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 6540d81..0ab04a5 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,22 @@ + CC = g++ + CFLAGS = -Wall -I. -I./sam -I./boost -L./sam + COFLAGS = -O3 -ffast-math -c +-PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads ++PROGRAMS = \ ++ rsem-extract-reference-transcripts \ ++ rsem-synthesis-reference-transcripts \ ++ rsem-preref \ ++ rsem-parse-alignments \ ++ rsem-build-read-index \ ++ rsem-run-em \ ++ rsem-tbam2gbam \ ++ rsem-run-gibbs \ ++ rsem-calculate-credibility-intervals \ ++ rsem-simulate-reads \ ++ rsem-bam2wig \ ++ rsem-get-unique \ ++ rsem-bam2readdepth \ ++ rsem-sam-validator \ ++ rsem-scan-for-paired-end-reads + + .PHONY : all ebseq clean + -- cgit v1.2.3 From 936715c9f491ddbb943f4665cca1e7ec3c84ac22 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 21 May 2015 14:30:43 -0400 Subject: gnu: gnutls: Update to 3.4.1. * gnu/packages/patches/gnutls-fix-duplicate-manpages.patch: Remove file. * gnu-system.am (dist_patch_DATA): Remove it. * gnu/packages/gnutls.scm (gnutls): Update to 3.4.1. Remove patch. --- gnu-system.am | 1 - gnu/packages/gnutls.scm | 6 ++--- .../patches/gnutls-fix-duplicate-manpages.patch | 30 ---------------------- 3 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 gnu/packages/patches/gnutls-fix-duplicate-manpages.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 23113bb16c..a79495480a 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -439,7 +439,6 @@ dist_patch_DATA = \ gnu/packages/patches/glibc-ldd-x86_64.patch \ gnu/packages/patches/glibc-locales.patch \ gnu/packages/patches/gmp-arm-asm-nothumb.patch \ - gnu/packages/patches/gnutls-fix-duplicate-manpages.patch \ gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \ gnu/packages/patches/gobject-introspection-cc.patch \ gnu/packages/patches/gobject-introspection-girepository.patch \ diff --git a/gnu/packages/gnutls.scm b/gnu/packages/gnutls.scm index c549ff3410..4ed339a09b 100644 --- a/gnu/packages/gnutls.scm +++ b/gnu/packages/gnutls.scm @@ -104,7 +104,7 @@ living in the same process.") (define-public gnutls (package (name "gnutls") - (version "3.4.0") + (version "3.4.1") (source (origin (method url-fetch) (uri @@ -115,9 +115,7 @@ living in the same process.") "/gnutls-" version ".tar.xz")) (sha256 (base32 - "0bj7ydvsyvml59b6040wg7694iz37rwnqnv09bic9ddz652588ml")) - (patches - (list (search-patch "gnutls-fix-duplicate-manpages.patch"))))) + "0bmih0zyiplr4v8798w0v9g3215zmganq18n8935cizkxj5zbdg9")))) (build-system gnu-build-system) (arguments '(#:configure-flags diff --git a/gnu/packages/patches/gnutls-fix-duplicate-manpages.patch b/gnu/packages/patches/gnutls-fix-duplicate-manpages.patch deleted file mode 100644 index 95a25560e5..0000000000 --- a/gnu/packages/patches/gnutls-fix-duplicate-manpages.patch +++ /dev/null @@ -1,30 +0,0 @@ -Remove duplicate manpage entries from Makefile. - ---- gnutls-3.4.0/doc/manpages/Makefile.am.orig 2015-04-06 04:48:30.000000000 -0400 -+++ gnutls-3.4.0/doc/manpages/Makefile.am 2015-04-12 16:52:58.029694525 -0400 -@@ -134,11 +134,8 @@ - APIMANS += gnutls_certificate_get_peers_subkey_id.3 - APIMANS += gnutls_certificate_get_trust_list.3 - APIMANS += gnutls_certificate_get_verify_flags.3 --APIMANS += gnutls_certificate_get_verify_flags.3 --APIMANS += gnutls_certificate_get_x509_crt.3 - APIMANS += gnutls_certificate_get_x509_crt.3 - APIMANS += gnutls_certificate_get_x509_key.3 --APIMANS += gnutls_certificate_get_x509_key.3 - APIMANS += gnutls_certificate_send_x509_rdn_sequence.3 - APIMANS += gnutls_certificate_server_set_request.3 - APIMANS += gnutls_certificate_set_dh_params.3 ---- gnutls-3.4.0/doc/manpages/Makefile.in.orig 2015-04-08 02:08:30.000000000 -0400 -+++ gnutls-3.4.0/doc/manpages/Makefile.in 2015-04-12 16:53:13.319694530 -0400 -@@ -1275,11 +1275,8 @@ - gnutls_certificate_get_peers_subkey_id.3 \ - gnutls_certificate_get_trust_list.3 \ - gnutls_certificate_get_verify_flags.3 \ -- gnutls_certificate_get_verify_flags.3 \ -- gnutls_certificate_get_x509_crt.3 \ - gnutls_certificate_get_x509_crt.3 \ - gnutls_certificate_get_x509_key.3 \ -- gnutls_certificate_get_x509_key.3 \ - gnutls_certificate_send_x509_rdn_sequence.3 \ - gnutls_certificate_server_set_request.3 \ - gnutls_certificate_set_dh_params.3 \ -- cgit v1.2.3 From 77af7b24072c94873a83b4fc53d960b55e4b728a Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Mon, 25 May 2015 22:03:39 -0400 Subject: gnu: maxima: Update to 5.36.1. * gnu/packages/patches/maxima-defsystem-mkdir.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/maths.scm (maxima): Update to 5.36.1. Add patch. --- gnu-system.am | 1 + gnu/packages/maths.scm | 9 +++++---- gnu/packages/patches/maxima-defsystem-mkdir.patch | 13 +++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/maxima-defsystem-mkdir.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index a79495480a..43ced1213b 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -490,6 +490,7 @@ dist_patch_DATA = \ gnu/packages/patches/luit-posix.patch \ gnu/packages/patches/m4-gets-undeclared.patch \ gnu/packages/patches/make-impure-dirs.patch \ + gnu/packages/patches/maxima-defsystem-mkdir.patch \ gnu/packages/patches/mc-fix-ncurses-build.patch \ gnu/packages/patches/mcron-install.patch \ gnu/packages/patches/mhash-keygen-test-segfault.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 89e0a17ab1..ca21806ced 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -922,7 +922,7 @@ to BMP, JPEG or PNG image formats.") (define-public maxima (package (name "maxima") - (version "5.34.1") + (version "5.36.1") (source (origin (method url-fetch) @@ -930,7 +930,8 @@ to BMP, JPEG or PNG image formats.") version "-source/" name "-" version ".tar.gz")) (sha256 (base32 - "1dw9vfzldpj7lv303xbw0wpyn6ra6i2yzwlrjbcx7j0jm5n43ji0")))) + "0x1rk659sn3cq0n5c90848ilzr1gb1wf0072fl6jhkdq00qgh2s0")) + (patches (list (search-patch "maxima-defsystem-mkdir.patch"))))) (build-system gnu-build-system) (inputs `(("gcl" ,gcl) @@ -951,8 +952,8 @@ to BMP, JPEG or PNG image formats.") (let ((v ,(package-version tk))) (string-take v (string-index-right v #\.))))) ;; By default Maxima attempts to write temporary files to - ;; '/tmp/nix-build-maxima-5.34.1', which doesn't exist. Work around - ;; that. + ;; '/tmp/nix-build-maxima-*', which won't exist at run time. + ;; Work around that. #:make-flags (list "TMPDIR=/tmp") #:phases (alist-cons-before 'check 'pre-check diff --git a/gnu/packages/patches/maxima-defsystem-mkdir.patch b/gnu/packages/patches/maxima-defsystem-mkdir.patch new file mode 100644 index 0000000000..bc42e51a32 --- /dev/null +++ b/gnu/packages/patches/maxima-defsystem-mkdir.patch @@ -0,0 +1,13 @@ +Change 'ensure-directories-exist' to look for 'mkdir' in $PATH, not in /bin. + +--- maxima-5.36.1/lisp-utils/defsystem.lisp.orig 2014-11-22 16:21:30.000000000 -0500 ++++ maxima-5.36.1/lisp-utils/defsystem.lisp 2015-05-25 21:53:31.223648483 -0400 +@@ -4627,7 +4627,7 @@ + (cmd (if (member :win32 *features*) + (format nil "mkdir \"~a\"" + (coerce (subst #\\ #\/ (coerce (namestring dir) 'list)) 'string)) +- (format nil "/bin/mkdir -p ~S" (namestring dir))))) ++ (format nil "mkdir -p ~S" (namestring dir))))) + (unless (directory dir) + (lisp:system cmd)) + ;; The second return value is supposed to be T if directories were -- cgit v1.2.3 From e7e8ea069e52052ab35a57284e18d171ab0f2daa Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Fri, 29 May 2015 15:50:14 +0800 Subject: gnu: webkitgtk-2.4: Update to 2.8.9, build with gtk3. * gnu/packages/webkit.scm (webkitgtk-2.4): Update to 2.8.9, build with gtk3. Move flex and which to 'native-inputs'. Remove #:configure-flags. (webkitgtk/gtk+-2): New variable. * gnu/packages/gnucash.scm (gnucash): Use webkitgtk/gtk+-2. * gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch: Remove file. * gnu-system.am (dist_patch_DATA): Remove it. Co-authored-by: Feng Shu --- gnu-system.am | 1 - gnu/packages/gnucash.scm | 2 +- .../patches/webkitgtk-2.4.8-gmutexlocker.patch | 289 --------------------- gnu/packages/webkit.scm | 28 +- 4 files changed, 20 insertions(+), 300 deletions(-) delete mode 100644 gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 43ced1213b..2cd4c62cf7 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -575,7 +575,6 @@ dist_patch_DATA = \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/vtk-mesa-10.patch \ gnu/packages/patches/w3m-fix-compile.patch \ - gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch \ gnu/packages/patches/weex-vacopy.patch \ gnu/packages/patches/wicd-template-instantiation.patch \ gnu/packages/patches/wicd-urwid-1.3.patch \ diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm index d254615cf2..6ab8f09ce6 100644 --- a/gnu/packages/gnucash.scm +++ b/gnu/packages/gnucash.scm @@ -56,7 +56,7 @@ ("libgnomecanvas" ,libgnomecanvas) ("libxml2" ,libxml2) ("libxslt" ,libxslt) - ("webkitgtk" ,webkitgtk-2.4))) + ("webkitgtk" ,webkitgtk/gtk+-2))) (native-inputs `(("glib" ,glib "bin") ; glib-compile-schemas, etc. ("intltool" ,intltool) diff --git a/gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch b/gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch deleted file mode 100644 index 79e12c302f..0000000000 --- a/gnu/packages/patches/webkitgtk-2.4.8-gmutexlocker.patch +++ /dev/null @@ -1,289 +0,0 @@ -Webkit's own WebCore::GMutexLocker conflicts with the GMutexLocker in -glib-2.44.0. - -Patch taken from . - - -diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp ---- webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp.gmutexlocker 2015-02-18 15:40:21.851816374 +0100 -+++ webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp 2015-02-18 15:45:58.560092191 +0100 -@@ -316,7 +316,7 @@ void MediaPlayerPrivateGStreamerBase::mu - #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) - PassRefPtr MediaPlayerPrivateGStreamerBase::updateTexture(TextureMapper* textureMapper) - { -- GMutexLocker lock(m_bufferMutex); -+ WebCore::GMutexLocker lock(m_bufferMutex); - if (!m_buffer) - return nullptr; - -@@ -366,7 +366,7 @@ void MediaPlayerPrivateGStreamerBase::tr - g_return_if_fail(GST_IS_BUFFER(buffer)); - - { -- GMutexLocker lock(m_bufferMutex); -+ WebCore::GMutexLocker lock(m_bufferMutex); - gst_buffer_replace(&m_buffer, buffer); - } - -@@ -398,7 +398,7 @@ void MediaPlayerPrivateGStreamerBase::pa - if (!m_player->visible()) - return; - -- GMutexLocker lock(m_bufferMutex); -+ WebCore::GMutexLocker lock(m_bufferMutex); - if (!m_buffer) - return; - -diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp -diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp ---- webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp.gmutexlocker 2015-02-18 15:16:11.995228731 +0100 -+++ webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp 2015-02-18 15:45:42.686843477 +0100 -@@ -118,7 +118,7 @@ static gboolean webkitVideoSinkTimeoutCa - WebKitVideoSink* sink = reinterpret_cast(data); - WebKitVideoSinkPrivate* priv = sink->priv; - -- GMutexLocker lock(priv->bufferMutex); -+ WebCore::GMutexLocker lock(priv->bufferMutex); - GstBuffer* buffer = priv->buffer; - priv->buffer = 0; - priv->timeoutId = 0; -@@ -140,7 +140,7 @@ static GstFlowReturn webkitVideoSinkRend - WebKitVideoSink* sink = WEBKIT_VIDEO_SINK(baseSink); - WebKitVideoSinkPrivate* priv = sink->priv; - -- GMutexLocker lock(priv->bufferMutex); -+ WebCore::GMutexLocker lock(priv->bufferMutex); - - if (priv->unlocked) - return GST_FLOW_OK; -@@ -279,7 +279,7 @@ static void webkitVideoSinkGetProperty(G - - static void unlockBufferMutex(WebKitVideoSinkPrivate* priv) - { -- GMutexLocker lock(priv->bufferMutex); -+ WebCore::GMutexLocker lock(priv->bufferMutex); - - if (priv->buffer) { - gst_buffer_unref(priv->buffer); -@@ -305,7 +305,7 @@ static gboolean webkitVideoSinkUnlockSto - WebKitVideoSinkPrivate* priv = WEBKIT_VIDEO_SINK(baseSink)->priv; - - { -- GMutexLocker lock(priv->bufferMutex); -+ WebCore::GMutexLocker lock(priv->bufferMutex); - priv->unlocked = false; - } - -@@ -330,7 +330,7 @@ static gboolean webkitVideoSinkStart(Gst - { - WebKitVideoSinkPrivate* priv = WEBKIT_VIDEO_SINK(baseSink)->priv; - -- GMutexLocker lock(priv->bufferMutex); -+ WebCore::GMutexLocker lock(priv->bufferMutex); - priv->unlocked = false; - return TRUE; - } -diff -up webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp.gmutexlocker webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp ---- webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp.gmutexlocker 2015-02-18 15:16:40.954678407 +0100 -+++ webkitgtk-2.4.8/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp 2015-02-18 15:45:19.567481225 +0100 -@@ -346,7 +346,7 @@ static void webKitWebSrcSetProperty(GObj - - switch (propID) { - case PROP_IRADIO_MODE: { -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - priv->iradioMode = g_value_get_boolean(value); - break; - } -@@ -364,7 +364,7 @@ static void webKitWebSrcGetProperty(GObj - WebKitWebSrc* src = WEBKIT_WEB_SRC(object); - WebKitWebSrcPrivate* priv = src->priv; - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - switch (propID) { - case PROP_IRADIO_MODE: - g_value_set_boolean(value, priv->iradioMode); -@@ -417,7 +417,7 @@ static gboolean webKitWebSrcStop(WebKitW - - ASSERT(isMainThread()); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - - bool seeking = priv->seekID; - -@@ -476,7 +476,7 @@ static gboolean webKitWebSrcStart(WebKit - - ASSERT(isMainThread()); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - - priv->startID = 0; - priv->corsAccessCheck = CORSNoCheck; -@@ -573,7 +573,7 @@ static GstStateChangeReturn webKitWebSrc - return ret; - } - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - switch (transition) { - case GST_STATE_CHANGE_READY_TO_PAUSED: - GST_DEBUG_OBJECT(src, "READY->PAUSED"); -@@ -604,7 +604,7 @@ static gboolean webKitWebSrcQueryWithPar - gst_query_parse_duration(query, &format, NULL); - - GST_DEBUG_OBJECT(src, "duration query in format %s", gst_format_get_name(format)); -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - if (format == GST_FORMAT_BYTES && src->priv->size > 0) { - gst_query_set_duration(query, format, src->priv->size); - result = TRUE; -@@ -612,7 +612,7 @@ static gboolean webKitWebSrcQueryWithPar - break; - } - case GST_QUERY_URI: { -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - gst_query_set_uri(query, src->priv->uri); - result = TRUE; - break; -@@ -653,7 +653,7 @@ static gchar* webKitWebSrcGetUri(GstURIH - WebKitWebSrc* src = WEBKIT_WEB_SRC(handler); - gchar* ret; - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - ret = g_strdup(src->priv->uri); - return ret; - } -@@ -668,7 +668,7 @@ static gboolean webKitWebSrcSetUri(GstUR - return FALSE; - } - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - - g_free(priv->uri); - priv->uri = 0; -@@ -704,7 +704,7 @@ static gboolean webKitWebSrcNeedDataMain - - ASSERT(isMainThread()); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - // already stopped - if (!priv->needDataID) - return FALSE; -@@ -725,7 +725,7 @@ static void webKitWebSrcNeedDataCb(GstAp - - GST_DEBUG_OBJECT(src, "Need more data: %u", length); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - if (priv->needDataID || !priv->paused) { - return; - } -@@ -739,7 +739,7 @@ static gboolean webKitWebSrcEnoughDataMa - - ASSERT(isMainThread()); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - // already stopped - if (!priv->enoughDataID) - return FALSE; -@@ -760,7 +760,7 @@ static void webKitWebSrcEnoughDataCb(Gst - - GST_DEBUG_OBJECT(src, "Have enough data"); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - if (priv->enoughDataID || priv->paused) { - return; - } -@@ -774,7 +774,7 @@ static gboolean webKitWebSrcSeekMainCb(W - - ASSERT(isMainThread()); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - // already stopped - if (!priv->seekID) - return FALSE; -@@ -792,7 +792,7 @@ static gboolean webKitWebSrcSeekDataCb(G - WebKitWebSrcPrivate* priv = src->priv; - - GST_DEBUG_OBJECT(src, "Seeking to offset: %" G_GUINT64_FORMAT, offset); -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - if (offset == priv->offset && priv->requestedOffset == priv->offset) - return TRUE; - -@@ -811,7 +811,7 @@ static gboolean webKitWebSrcSeekDataCb(G - void webKitWebSrcSetMediaPlayer(WebKitWebSrc* src, WebCore::MediaPlayer* player) - { - ASSERT(player); -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - src->priv->player = player; - } - -@@ -841,7 +841,7 @@ char* StreamingClient::createReadBuffer( - - mapGstBuffer(buffer); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - priv->buffer = adoptGRef(buffer); - locker.unlock(); - -@@ -867,7 +867,7 @@ void StreamingClient::handleResponseRece - return; - } - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - - priv->corsAccessCheck = corsAccessCheck; - -@@ -966,7 +966,7 @@ void StreamingClient::handleDataReceived - WebKitWebSrc* src = WEBKIT_WEB_SRC(m_src); - WebKitWebSrcPrivate* priv = src->priv; - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - - GST_LOG_OBJECT(src, "Have %lld bytes of data", priv->buffer ? static_cast(gst_buffer_get_size(priv->buffer.get())) : length); - -@@ -1035,7 +1035,7 @@ void StreamingClient::handleNotifyFinish - - GST_DEBUG_OBJECT(src, "Have EOS"); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - if (!priv->seekID) { - locker.unlock(); - gst_app_src_end_of_stream(priv->appsrc); -@@ -1194,7 +1194,7 @@ void ResourceHandleStreamingClient::wasB - - GST_ERROR_OBJECT(src, "Request was blocked"); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - uri.reset(g_strdup(src->priv->uri)); - locker.unlock(); - -@@ -1208,7 +1208,7 @@ void ResourceHandleStreamingClient::cann - - GST_ERROR_OBJECT(src, "Cannot show URL"); - -- GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); -+ WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src)); - uri.reset(g_strdup(src->priv->uri)); - locker.unlock(); - -diff -up webkitgtk-2.4.8/Source/WTF/wtf/gobject/GMutexLocker.h.gmutexlocker webkitgtk-2.4.8/Source/WTF/wtf/gobject/GMutexLocker.h diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index b091c88601..d2a7f059c3 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -114,29 +114,39 @@ HTML/CSS applications to full-fledged web browsers.") license:bsd-2 license:bsd-3)))) +;; Latest release of the stable 2.4 series, with WebKit1 support. (define-public webkitgtk-2.4 - ;; Latest release of the stable 2.4 series. (package (inherit webkitgtk) (name "webkitgtk") - (version "2.4.8") + (version "2.4.9") (source (origin (method url-fetch) (uri (string-append "http://www.webkitgtk.org/releases/" name "-" version ".tar.xz")) (sha256 (base32 - "08xxqsxpa63nzgbsz63vrdxdxgpysyiy7jdcjb57k1hprdcibwb8")) - (patches (list (search-patch "webkitgtk-2.4.8-gmutexlocker.patch"))))) + "0r651ar3p0f8zwl7764kyimxk5hy88cwy116pv8cl5l8hbkjkpxg")))) (build-system gnu-build-system) (arguments '(#:tests? #f ; no tests #:phases (modify-phases %standard-phases (add-after 'unpack 'set-gcc - (lambda _ (setenv "CC" "gcc") #t))) - #:configure-flags '("--enable-webkit2=no" - "--with-gtk=2.0"))) - (inputs + (lambda _ (setenv "CC" "gcc") #t))))) + (native-inputs `(("flex" ,flex) ("which" ,which) - ,@(package-inputs webkitgtk))))) + ,@(package-native-inputs webkitgtk))))) + +;; Last GTK+2 port, required by GnuCash. +(define-public webkitgtk/gtk+-2 + (package (inherit webkitgtk-2.4) + (name "webkitgtk") + (arguments + `(#:configure-flags + '("--enable-webkit2=no" + "--with-gtk=2.0") + ,@(package-arguments webkitgtk-2.4))) + (propagated-inputs + `(("gtk+-2" ,gtk+-2) + ("libsoup" ,libsoup))))) -- cgit v1.2.3 From 716e20a2bccbbff71ff1839de2d9f97e7efd5a5f Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 5 Jun 2015 23:15:25 -0400 Subject: gnu: icecat: Update to 31.7.0-gnu1. * gnu/packages/patches/icecat-CVE-2015-0797.patch, gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch, gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch, gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch, gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch, gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch, gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch, gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch, gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch, gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch, gnu/packages/patches/icecat-CVE-2015-2716.patch: Remove files. * gnu-system.am (dist_patch_DATA): Remove them. * gnu/packages/gnuzilla.scm (icecat): Update to 31.7.0-gnu1. Remove patches. --- gnu-system.am | 11 - gnu/packages/gnuzilla.scm | 15 +- gnu/packages/patches/icecat-CVE-2015-0797.patch | 35 --- .../patches/icecat-CVE-2015-2708-pt1.patch | 240 ----------------- .../patches/icecat-CVE-2015-2708-pt2.patch | 284 --------------------- .../patches/icecat-CVE-2015-2708-pt3.patch | 228 ----------------- .../patches/icecat-CVE-2015-2708-pt4.patch | 26 -- .../patches/icecat-CVE-2015-2710-pt1.patch | 199 --------------- .../patches/icecat-CVE-2015-2710-pt2.patch | 64 ----- .../patches/icecat-CVE-2015-2710-pt3.patch | 50 ---- .../patches/icecat-CVE-2015-2713-pt1.patch | 102 -------- .../patches/icecat-CVE-2015-2713-pt2.patch | 47 ---- gnu/packages/patches/icecat-CVE-2015-2716.patch | 62 ----- 13 files changed, 2 insertions(+), 1361 deletions(-) delete mode 100644 gnu/packages/patches/icecat-CVE-2015-0797.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch delete mode 100644 gnu/packages/patches/icecat-CVE-2015-2716.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 2cd4c62cf7..3073fef498 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -453,17 +453,6 @@ dist_patch_DATA = \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ gnu/packages/patches/hop-linker-flags.patch \ - gnu/packages/patches/icecat-CVE-2015-0797.patch \ - gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch \ - gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch \ - gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch \ - gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch \ - gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch \ - gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch \ - gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch \ - gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch \ - gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch \ - gnu/packages/patches/icecat-CVE-2015-2716.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 2450a1e68a..7caa7314a9 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -225,7 +225,7 @@ standards.") (define-public icecat (package (name "icecat") - (version "31.6.0-gnu1") + (version "31.7.0-gnu1") (source (origin (method url-fetch) @@ -234,18 +234,7 @@ standards.") name "-" version ".tar.bz2")) (sha256 (base32 - "1a4l23msg4cpc4yp59q2z6xv63r6advlbnjy65v4djv6yhgnqf1i")) - (patches (map search-patch '("icecat-CVE-2015-0797.patch" - "icecat-CVE-2015-2708-pt1.patch" - "icecat-CVE-2015-2708-pt2.patch" - "icecat-CVE-2015-2708-pt3.patch" - "icecat-CVE-2015-2708-pt4.patch" - "icecat-CVE-2015-2710-pt1.patch" - "icecat-CVE-2015-2710-pt2.patch" - "icecat-CVE-2015-2710-pt3.patch" - "icecat-CVE-2015-2713-pt1.patch" - "icecat-CVE-2015-2713-pt2.patch" - "icecat-CVE-2015-2716.patch"))))) + "0a25jp5afla2dxzj7i4cyvqpa5smsn7ns3xvpzqw6pc7naixkpap")))) (build-system gnu-build-system) (inputs `(("alsa-lib" ,alsa-lib) diff --git a/gnu/packages/patches/icecat-CVE-2015-0797.patch b/gnu/packages/patches/icecat-CVE-2015-0797.patch deleted file mode 100644 index 5727ed753c..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-0797.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 147543038273042f71284fa8487c71670163da5f Mon Sep 17 00:00:00 2001 -From: Ralph Giles -Date: Tue, 31 Mar 2015 16:18:22 -0700 -Subject: [PATCH] Bug 1080995 - Don't use the h264parser gstreamer element. - r=kinetik, a=sledru - ---- - content/media/gstreamer/GStreamerFormatHelper.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/content/media/gstreamer/GStreamerFormatHelper.cpp b/content/media/gstreamer/GStreamerFormatHelper.cpp -index 25095e7..ebd12c2 100644 ---- a/content/media/gstreamer/GStreamerFormatHelper.cpp -+++ b/content/media/gstreamer/GStreamerFormatHelper.cpp -@@ -67,6 +67,7 @@ static char const * const sDefaultCodecCaps[][2] = { - - static char const * const sPluginBlacklist[] = { - "flump3dec", -+ "h264parse", - }; - - GStreamerFormatHelper::GStreamerFormatHelper() -@@ -251,7 +252,8 @@ static gboolean FactoryFilter(GstPluginFeature *aFeature, gpointer) - const gchar *className = - gst_element_factory_get_klass(GST_ELEMENT_FACTORY_CAST(aFeature)); - -- if (!strstr(className, "Decoder") && !strstr(className, "Demux")) { -+ if (!strstr(className, "Decoder") && !strstr(className, "Demux") && -+ !strstr(className, "Parser")) { - return FALSE; - } - --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch deleted file mode 100644 index e755d7531a..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2708-pt1.patch +++ /dev/null @@ -1,240 +0,0 @@ -From 5f61ae17ec82d288a3fe4892ec999c0e20c486c0 Mon Sep 17 00:00:00 2001 -From: "Byron Campen [:bwc]" -Date: Mon, 6 Apr 2015 11:52:28 -0700 -Subject: [PATCH] Bug 1151139 - Simplify how we choose which streams to gather - stats from. r=mt, a=abillings - ---- - ...t_peerConnection_offerRequiresReceiveAudio.html | 2 + - ...t_peerConnection_offerRequiresReceiveVideo.html | 2 + - ...rConnection_offerRequiresReceiveVideoAudio.html | 2 + - media/mtransport/nricectx.h | 13 +++++ - media/mtransport/nricemediastream.cpp | 1 + - media/mtransport/nricemediastream.h | 5 +- - .../src/peerconnection/PeerConnectionImpl.cpp | 66 ++++++++++------------ - .../src/peerconnection/PeerConnectionImpl.h | 2 +- - 8 files changed, 54 insertions(+), 39 deletions(-) - -diff --git a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html -index 69d7e49..d68c078 100644 ---- a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html -+++ b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html -@@ -17,6 +17,8 @@ - - runTest(function() { - var test = new PeerConnectionTest(); -+ test.chain.remove('PC_LOCAL_CHECK_STATS'); -+ test.chain.remove('PC_REMOTE_CHECK_STATS'); - test.setOfferConstraints({ mandatory: { OfferToReceiveAudio: true } }); - test.run(); - }); -diff --git a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html -index 5f1d0e5..0ecb0b7 100644 ---- a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html -+++ b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html -@@ -17,6 +17,8 @@ - - runTest(function() { - var test = new PeerConnectionTest(); -+ test.chain.remove('PC_LOCAL_CHECK_STATS'); -+ test.chain.remove('PC_REMOTE_CHECK_STATS'); - test.setOfferConstraints({ mandatory: { OfferToReceiveVideo: true } }); - test.run(); - }); -diff --git a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html -index c3dea10..78eb0d4 100644 ---- a/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html -+++ b/dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html -@@ -17,6 +17,8 @@ - - runTest(function() { - var test = new PeerConnectionTest(); -+ test.chain.remove('PC_LOCAL_CHECK_STATS'); -+ test.chain.remove('PC_REMOTE_CHECK_STATS'); - test.setOfferConstraints({ mandatory: { - OfferToReceiveVideo: true, - OfferToReceiveAudio: true -diff --git a/media/mtransport/nricectx.h b/media/mtransport/nricectx.h -index d1209a7..7350666 100644 ---- a/media/mtransport/nricectx.h -+++ b/media/mtransport/nricectx.h -@@ -196,6 +196,19 @@ class NrIceCtx { - RefPtr CreateStream(const std::string& name, - int components); - -+ RefPtr GetStream(size_t index) { -+ if (index < streams_.size()) { -+ return streams_[index]; -+ } -+ return nullptr; -+ } -+ -+ // Some might be null -+ size_t GetStreamCount() const -+ { -+ return streams_.size(); -+ } -+ - // The name of the ctx - const std::string& name() const { return name_; } - -diff --git a/media/mtransport/nricemediastream.cpp b/media/mtransport/nricemediastream.cpp -index 9e96cb5..d2b6429 100644 ---- a/media/mtransport/nricemediastream.cpp -+++ b/media/mtransport/nricemediastream.cpp -@@ -209,6 +209,7 @@ nsresult NrIceMediaStream::ParseAttributes(std::vector& - return NS_ERROR_FAILURE; - } - -+ has_parsed_attrs_ = true; - return NS_OK; - } - -diff --git a/media/mtransport/nricemediastream.h b/media/mtransport/nricemediastream.h -index aba5fc3..2494ecf 100644 ---- a/media/mtransport/nricemediastream.h -+++ b/media/mtransport/nricemediastream.h -@@ -149,6 +149,7 @@ class NrIceMediaStream { - - // Parse remote attributes - nsresult ParseAttributes(std::vector& candidates); -+ bool HasParsedAttributes() const { return has_parsed_attrs_; } - - // Parse trickle ICE candidate - nsresult ParseTrickleCandidate(const std::string& candidate); -@@ -204,7 +205,8 @@ class NrIceMediaStream { - name_(name), - components_(components), - stream_(nullptr), -- opaque_(nullptr) {} -+ opaque_(nullptr), -+ has_parsed_attrs_(false) {} - - DISALLOW_COPY_ASSIGN(NrIceMediaStream); - -@@ -214,6 +216,7 @@ class NrIceMediaStream { - const int components_; - nr_ice_media_stream *stream_; - ScopedDeletePtr opaque_; -+ bool has_parsed_attrs_; - }; - - -diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp -index ebcc17d..c70e3e4 100644 ---- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp -+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp -@@ -149,7 +149,8 @@ PRLogModuleInfo *signalingLogInfo() { - namespace sipcc { - - #ifdef MOZILLA_INTERNAL_API --RTCStatsQuery::RTCStatsQuery(bool internal) : internalStats(internal) { -+RTCStatsQuery::RTCStatsQuery(bool internal) : internalStats(internal), -+ grabAllLevels(false) { - } - - RTCStatsQuery::~RTCStatsQuery() { -@@ -2037,32 +2038,8 @@ PeerConnectionImpl::BuildStatsQuery_m( - - query->iceCtx = mMedia->ice_ctx(); - -- // From the list of MediaPipelines, determine the set of NrIceMediaStreams -- // we are interested in. -- std::set levelsToGrab; -- if (trackId) { -- for (size_t p = 0; p < query->pipelines.Length(); ++p) { -- size_t level = query->pipelines[p]->level(); -- MOZ_ASSERT(level); -- levelsToGrab.insert(level); -- } -- } else { -- // We want to grab all streams, so ignore the pipelines (this also ends up -- // grabbing DataChannel streams, which is what we want) -- for (size_t s = 0; s < mMedia->num_ice_media_streams(); ++s) { -- levelsToGrab.insert(s + 1); // mIceStreams is 0-indexed -- } -- } -- -- for (auto s = levelsToGrab.begin(); s != levelsToGrab.end(); ++s) { -- // TODO(bcampen@mozilla.com): I may need to revisit this for bundle. -- // (Bug 786234) -- RefPtr temp(mMedia->ice_media_stream(*s - 1)); -- RefPtr flow(mMedia->GetTransportFlow(*s, false)); -- // flow can be null for unused levels, such as unused DataChannels -- if (temp && flow) { -- query->streams.AppendElement(temp); -- } -+ if (!trackId) { -+ query->grabAllLevels = true; - } - - return rv; -@@ -2103,6 +2080,9 @@ static void RecordIceStats_s( - bool internalStats, - DOMHighResTimeStamp now, - RTCStatsReportInternal* report) { -+ if (!mediaStream.HasParsedAttributes()) { -+ return; -+ } - - NS_ConvertASCIItoUTF16 componentId(mediaStream.name().c_str()); - if (internalStats) { -@@ -2292,20 +2272,32 @@ PeerConnectionImpl::ExecuteStatsQuery_s(RTCStatsQuery *query) { - break; - } - } -+ -+ if (!query->grabAllLevels) { -+ // If we're grabbing all levels, that means we want datachannels too, -+ // which don't have pipelines. -+ if (query->iceCtx->GetStream(p - 1)) { -+ RecordIceStats_s(*query->iceCtx->GetStream(p - 1), -+ query->internalStats, -+ query->now, -+ &(query->report)); -+ } -+ } - } - -- // Gather stats from ICE -- for (size_t s = 0; s != query->streams.Length(); ++s) { -- RecordIceStats_s(*query->streams[s], -- query->internalStats, -- query->now, -- &(query->report)); -+ if (query->grabAllLevels) { -+ for (size_t i = 0; i < query->iceCtx->GetStreamCount(); ++i) { -+ if (query->iceCtx->GetStream(i)) { -+ RecordIceStats_s(*query->iceCtx->GetStream(i), -+ query->internalStats, -+ query->now, -+ &(query->report)); -+ } -+ } - } - -- // NrIceCtx and NrIceMediaStream must be destroyed on STS, so it is not safe -- // to dispatch them back to main. -- // We clear streams first to maintain destruction order -- query->streams.Clear(); -+ // NrIceCtx must be destroyed on STS, so it is not safe -+ // to dispatch it back to main. - query->iceCtx = nullptr; - return NS_OK; - } -diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h -index 847085c..497230a 100644 ---- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h -+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h -@@ -174,7 +174,7 @@ class RTCStatsQuery { - bool internalStats; - nsTArray> pipelines; - mozilla::RefPtr iceCtx; -- nsTArray> streams; -+ bool grabAllLevels; - DOMHighResTimeStamp now; - }; - #endif // MOZILLA_INTERNAL_API --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch deleted file mode 100644 index 9788806557..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2708-pt2.patch +++ /dev/null @@ -1,284 +0,0 @@ -From 272c1ba11fac7a9ceede2f4f737bb27b4bbcad71 Mon Sep 17 00:00:00 2001 -From: Steve Fink -Date: Thu, 19 Mar 2015 20:50:57 -0700 -Subject: [PATCH] Bug 1120655 - Suppress zone/compartment collection while - iterating. r=terrence, a=bkerensa - ---- - js/src/gc/Zone.h | 9 ++++---- - js/src/jsgc.cpp | 57 +++++++++++++++++++++++++++++++++++---------------- - js/src/jsgc.h | 11 +++++++++- - js/src/vm/Runtime.cpp | 1 + - js/src/vm/Runtime.h | 3 +++ - 5 files changed, 58 insertions(+), 23 deletions(-) - -diff --git a/js/src/gc/Zone.h b/js/src/gc/Zone.h -index e7f687a..dd058f0 100644 ---- a/js/src/gc/Zone.h -+++ b/js/src/gc/Zone.h -@@ -353,10 +353,11 @@ enum ZoneSelector { - - class ZonesIter { - private: -+ gc::AutoEnterIteration iterMarker; - JS::Zone **it, **end; - - public: -- ZonesIter(JSRuntime *rt, ZoneSelector selector) { -+ ZonesIter(JSRuntime *rt, ZoneSelector selector) : iterMarker(rt) { - it = rt->zones.begin(); - end = rt->zones.end(); - -@@ -427,13 +428,13 @@ struct CompartmentsInZoneIter - template - class CompartmentsIterT - { -- private: -+ gc::AutoEnterIteration iterMarker; - ZonesIterT zone; - mozilla::Maybe comp; - - public: - explicit CompartmentsIterT(JSRuntime *rt) -- : zone(rt) -+ : iterMarker(rt), zone(rt) - { - if (zone.done()) - comp.construct(); -@@ -442,7 +443,7 @@ class CompartmentsIterT - } - - CompartmentsIterT(JSRuntime *rt, ZoneSelector selector) -- : zone(rt, selector) -+ : iterMarker(rt), zone(rt, selector) - { - if (zone.done()) - comp.construct(); -diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp -index 15c86c8..1dfe0ab 100644 ---- a/js/src/jsgc.cpp -+++ b/js/src/jsgc.cpp -@@ -2525,7 +2525,7 @@ ReleaseObservedTypes(JSRuntime* rt) - * arbitrary compartment in the zone. - */ - static void --SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool lastGC) -+SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool destroyingRuntime) - { - JSRuntime *rt = zone->runtimeFromMainThread(); - JSDestroyCompartmentCallback callback = rt->destroyCompartmentCallback; -@@ -2543,7 +2543,7 @@ SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool lastGC) - * deleted and keepAtleastOne is true. - */ - bool dontDelete = read == end && !foundOne && keepAtleastOne; -- if ((!comp->marked && !dontDelete) || lastGC) { -+ if ((!comp->marked && !dontDelete) || destroyingRuntime) { - if (callback) - callback(fop, comp); - if (comp->principals) -@@ -2559,9 +2559,13 @@ SweepCompartments(FreeOp *fop, Zone *zone, bool keepAtleastOne, bool lastGC) - } - - static void --SweepZones(FreeOp *fop, bool lastGC) -+SweepZones(FreeOp *fop, bool destroyingRuntime) - { - JSRuntime *rt = fop->runtime(); -+ MOZ_ASSERT_IF(destroyingRuntime, rt->numActiveZoneIters == 0); -+ if (rt->numActiveZoneIters) -+ return; -+ - JSZoneCallback callback = rt->destroyZoneCallback; - - /* Skip the atomsCompartment zone. */ -@@ -2576,17 +2580,17 @@ SweepZones(FreeOp* fop, bool lastGC) - - if (zone->wasGCStarted()) { - if ((zone->allocator.arenas.arenaListsAreEmpty() && !zone->hasMarkedCompartments()) || -- lastGC) -+ destroyingRuntime) - { - zone->allocator.arenas.checkEmptyFreeLists(); - if (callback) - callback(zone); -- SweepCompartments(fop, zone, false, lastGC); -+ SweepCompartments(fop, zone, false, destroyingRuntime); - JS_ASSERT(zone->compartments.empty()); - fop->delete_(zone); - continue; - } -- SweepCompartments(fop, zone, true, lastGC); -+ SweepCompartments(fop, zone, true, destroyingRuntime); - } - *write++ = zone; - } -@@ -3787,7 +3791,7 @@ EndSweepingZoneGroup(JSRuntime *rt) - } - - static void --BeginSweepPhase(JSRuntime *rt, bool lastGC) -+BeginSweepPhase(JSRuntime *rt, bool destroyingRuntime) - { - /* - * Sweep phase. -@@ -3804,7 +3808,7 @@ BeginSweepPhase(JSRuntime *rt, bool lastGC) - gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_SWEEP); - - #ifdef JS_THREADSAFE -- rt->gcSweepOnBackgroundThread = !lastGC && rt->useHelperThreads(); -+ rt->gcSweepOnBackgroundThread = !destroyingRuntime && rt->useHelperThreads(); - #endif - - #ifdef DEBUG -@@ -3903,12 +3907,12 @@ SweepPhase(JSRuntime *rt, SliceBudget &sliceBudget) - } - - static void --EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool lastGC) -+EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool destroyingRuntime) - { - gcstats::AutoPhase ap(rt->gcStats, gcstats::PHASE_SWEEP); - FreeOp fop(rt, rt->gcSweepOnBackgroundThread); - -- JS_ASSERT_IF(lastGC, !rt->gcSweepOnBackgroundThread); -+ JS_ASSERT_IF(destroyingRuntime, !rt->gcSweepOnBackgroundThread); - - JS_ASSERT(rt->gcMarker.isDrained()); - rt->gcMarker.stop(); -@@ -3959,8 +3963,8 @@ EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool lastGC) - * This removes compartments from rt->compartment, so we do it last to make - * sure we don't miss sweeping any compartments. - */ -- if (!lastGC) -- SweepZones(&fop, lastGC); -+ if (!destroyingRuntime) -+ SweepZones(&fop, destroyingRuntime); - - if (!rt->gcSweepOnBackgroundThread) { - /* -@@ -4001,8 +4005,8 @@ EndSweepPhase(JSRuntime *rt, JSGCInvocationKind gckind, bool lastGC) - rt->freeLifoAlloc.freeAll(); - - /* Ensure the compartments get swept if it's the last GC. */ -- if (lastGC) -- SweepZones(&fop, lastGC); -+ if (destroyingRuntime) -+ SweepZones(&fop, destroyingRuntime); - } - - for (ZonesIter zone(rt, WithAtoms); !zone.done(); zone.next()) { -@@ -4339,7 +4343,7 @@ IncrementalCollectSlice(JSRuntime *rt, - AutoCopyFreeListToArenasForGC copy(rt); - AutoGCSlice slice(rt); - -- bool lastGC = (reason == JS::gcreason::DESTROY_RUNTIME); -+ bool destroyingRuntime = (reason == JS::gcreason::DESTROY_RUNTIME); - - gc::State initialState = rt->gcIncrementalState; - -@@ -4384,7 +4388,7 @@ IncrementalCollectSlice(JSRuntime *rt, - return; - } - -- if (!lastGC) -+ if (!destroyingRuntime) - PushZealSelectedObjects(rt); - - rt->gcIncrementalState = MARK; -@@ -4426,7 +4430,7 @@ IncrementalCollectSlice(JSRuntime *rt, - * This runs to completion, but we don't continue if the budget is - * now exhasted. - */ -- BeginSweepPhase(rt, lastGC); -+ BeginSweepPhase(rt, destroyingRuntime); - if (sliceBudget.isOverBudget()) - break; - -@@ -4445,7 +4449,7 @@ IncrementalCollectSlice(JSRuntime *rt, - if (!finished) - break; - -- EndSweepPhase(rt, gckind, lastGC); -+ EndSweepPhase(rt, gckind, destroyingRuntime); - - if (rt->gcSweepOnBackgroundThread) - rt->gcHelperThread.startBackgroundSweep(gckind == GC_SHRINK); -@@ -5386,3 +5390,20 @@ JS::AutoAssertNoGC::~AutoAssertNoGC() - MOZ_ASSERT(gcNumber == runtime->gcNumber, "GC ran inside an AutoAssertNoGC scope."); - } - #endif -+ -+namespace js { -+namespace gc { -+ -+AutoEnterIteration::AutoEnterIteration(JSRuntime *rt_) : rt(rt_) -+{ -+ ++rt->numActiveZoneIters; -+} -+ -+AutoEnterIteration::~AutoEnterIteration() -+{ -+ MOZ_ASSERT(rt->numActiveZoneIters); -+ --rt->numActiveZoneIters; -+} -+ -+} /* namespace gc */ -+} /* namespace js */ -diff --git a/js/src/jsgc.h b/js/src/jsgc.h -index 825cff5..ca331c0 100644 ---- a/js/src/jsgc.h -+++ b/js/src/jsgc.h -@@ -1077,7 +1077,7 @@ MaybeVerifyBarriers(JSContext* cx, bool always = false) - /* - * Instances of this class set the |JSRuntime::suppressGC| flag for the duration - * that they are live. Use of this class is highly discouraged. Please carefully -- * read the comment in jscntxt.h above |suppressGC| and take all appropriate -+ * read the comment in vm/Runtime.h above |suppressGC| and take all appropriate - * precautions before instantiating this class. - */ - class AutoSuppressGC -@@ -1113,6 +1113,15 @@ class AutoEnterOOMUnsafeRegion - class AutoEnterOOMUnsafeRegion {}; - #endif /* DEBUG */ - -+/* Prevent compartments and zones from being collected during iteration. */ -+class AutoEnterIteration { -+ JSRuntime *rt; -+ -+ public: -+ AutoEnterIteration(JSRuntime *rt_); -+ ~AutoEnterIteration(); -+}; -+ - } /* namespace gc */ - - #ifdef DEBUG -diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp -index bb5c8680..0d8c6cd 100644 ---- a/js/src/vm/Runtime.cpp -+++ b/js/src/vm/Runtime.cpp -@@ -195,6 +195,7 @@ JSRuntime::JSRuntime(JSRuntime *parentRuntime, JSUseHelperThreads useHelperThrea - gcShouldCleanUpEverything(false), - gcGrayBitsValid(false), - gcIsNeeded(0), -+ numActiveZoneIters(0), - gcStats(thisFromCtor()), - gcNumber(0), - gcStartNumber(0), -diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h -index 5aeb924..ba4180e 100644 ---- a/js/src/vm/Runtime.h -+++ b/js/src/vm/Runtime.h -@@ -1061,6 +1061,9 @@ struct JSRuntime : public JS::shadow::Runtime, - */ - volatile uintptr_t gcIsNeeded; - -+ mozilla::Atomic numActiveZoneIters; -+ friend class js::gc::AutoEnterIteration; -+ - js::gcstats::Statistics gcStats; - - /* Incremented on every GC slice. */ --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch deleted file mode 100644 index f684804d0b..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2708-pt3.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 4dcbca8b3c26b451e1376cd1b7c88ab984a45b39 Mon Sep 17 00:00:00 2001 -From: Mats Palmgren -Date: Tue, 14 Apr 2015 22:12:39 -0400 -Subject: [PATCH] Bug 1143299 - Make frame insertion methods deal with - aPrevFrame being on an overflow list. r=roc, a=bkerensa - ---- - layout/generic/nsBlockFrame.cpp | 18 ++++++++++++--- - layout/generic/nsBlockFrame.h | 14 ++++++++---- - layout/generic/nsContainerFrame.cpp | 41 +++++++++++++++++++--------------- - layout/tables/nsTableFrame.cpp | 2 ++ - layout/tables/nsTableRowFrame.cpp | 2 ++ - layout/tables/nsTableRowGroupFrame.cpp | 2 ++ - 6 files changed, 54 insertions(+), 25 deletions(-) - -diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp -index a011bcf..70d5297 100644 ---- a/layout/generic/nsBlockFrame.cpp -+++ b/layout/generic/nsBlockFrame.cpp -@@ -1049,7 +1049,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext, - state.mOverflowTracker = &tracker; - - // Drain & handle pushed floats -- DrainPushedFloats(state); -+ DrainPushedFloats(); - nsOverflowAreas fcBounds; - nsReflowStatus fcStatus = NS_FRAME_COMPLETE; - ReflowPushedFloats(state, fcBounds, fcStatus); -@@ -4438,9 +4438,13 @@ nsBlockFrame::DrainSelfOverflowList() - * might push some of them on). Floats with placeholders in this block - * are reflowed by (nsBlockReflowState/nsLineLayout)::AddFloat, which - * also maintains these invariants. -+ * -+ * DrainSelfPushedFloats moves any pushed floats from this block's own -+ * PushedFloats list back into mFloats. DrainPushedFloats additionally -+ * moves frames from its prev-in-flow's PushedFloats list into mFloats. - */ - void --nsBlockFrame::DrainPushedFloats(nsBlockReflowState& aState) -+nsBlockFrame::DrainSelfPushedFloats() - { - #ifdef DEBUG - // Between when we drain pushed floats and when we complete reflow, -@@ -4503,12 +4507,18 @@ nsBlockFrame::DrainPushedFloats(nsBlockReflowState& aState) - RemovePushedFloats()->Delete(presContext->PresShell()); - } - } -+} -+ -+void -+nsBlockFrame::DrainPushedFloats() -+{ -+ DrainSelfPushedFloats(); - - // After our prev-in-flow has completed reflow, it may have a pushed - // floats list, containing floats that we need to own. Take these. - nsBlockFrame* prevBlock = static_cast(GetPrevInFlow()); - if (prevBlock) { -- AutoFrameListPtr list(presContext, prevBlock->RemovePushedFloats()); -+ AutoFrameListPtr list(PresContext(), prevBlock->RemovePushedFloats()); - if (list && list->NotEmpty()) { - mFloats.InsertFrames(this, nullptr, *list); - } -@@ -4711,6 +4721,7 @@ nsBlockFrame::AppendFrames(ChildListID aListID, - return nsContainerFrame::AppendFrames(aListID, aFrameList); - } - else if (kFloatList == aListID) { -+ DrainSelfPushedFloats(); // ensure the last frame is in mFloats - mFloats.AppendFrames(nullptr, aFrameList); - return NS_OK; - } -@@ -4757,6 +4768,7 @@ nsBlockFrame::InsertFrames(ChildListID aListID, - return nsContainerFrame::InsertFrames(aListID, aPrevFrame, aFrameList); - } - else if (kFloatList == aListID) { -+ DrainSelfPushedFloats(); // ensure aPrevFrame is in mFloats - mFloats.InsertFrames(this, aPrevFrame, aFrameList); - return NS_OK; - } -diff --git a/layout/generic/nsBlockFrame.h b/layout/generic/nsBlockFrame.h -index 1a6bb1e..07f7508 100644 ---- a/layout/generic/nsBlockFrame.h -+++ b/layout/generic/nsBlockFrame.h -@@ -533,10 +533,16 @@ protected: - return GetStateBits() & NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS; - } - -- /** grab pushed floats from this block's prevInFlow, and splice -- * them into this block's mFloats list. -- */ -- void DrainPushedFloats(nsBlockReflowState& aState); -+ /** -+ * Moves frames from our PushedFloats list back into our mFloats list. -+ */ -+ void DrainSelfPushedFloats(); -+ -+ /** -+ * First calls DrainSelfPushedFloats() then grabs pushed floats from this -+ * block's prev-in-flow, and splice them into this block's mFloats list too. -+ */ -+ void DrainPushedFloats(); - - /** Load all our floats into the float manager (without reflowing them). - * Assumes float manager is in our own coordinate system. -diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp -index 76f0748..3ffcba7 100644 ---- a/layout/generic/nsContainerFrame.cpp -+++ b/layout/generic/nsContainerFrame.cpp -@@ -102,16 +102,18 @@ nsContainerFrame::AppendFrames(ChildListID aListID, - return NS_ERROR_INVALID_ARG; - } - } -- if (aFrameList.NotEmpty()) { -- mFrames.AppendFrames(this, aFrameList); - -- // Ask the parent frame to reflow me. -- if (aListID == kPrincipalList) -- { -- PresContext()->PresShell()-> -- FrameNeedsReflow(this, nsIPresShell::eTreeChange, -- NS_FRAME_HAS_DIRTY_CHILDREN); -- } -+ if (MOZ_UNLIKELY(aFrameList.IsEmpty())) { -+ return NS_OK; -+ } -+ -+ DrainSelfOverflowList(); // ensure the last frame is in mFrames -+ mFrames.AppendFrames(this, aFrameList); -+ -+ if (aListID != kNoReflowPrincipalList) { -+ PresContext()->PresShell()-> -+ FrameNeedsReflow(this, nsIPresShell::eTreeChange, -+ NS_FRAME_HAS_DIRTY_CHILDREN); - } - return NS_OK; - } -@@ -131,16 +133,19 @@ nsContainerFrame::InsertFrames(ChildListID aListID, - return NS_ERROR_INVALID_ARG; - } - } -- if (aFrameList.NotEmpty()) { -- // Insert frames after aPrevFrame -- mFrames.InsertFrames(this, aPrevFrame, aFrameList); - -- if (aListID == kPrincipalList) -- { -- PresContext()->PresShell()-> -- FrameNeedsReflow(this, nsIPresShell::eTreeChange, -- NS_FRAME_HAS_DIRTY_CHILDREN); -- } -+ if (MOZ_UNLIKELY(aFrameList.IsEmpty())) { -+ return NS_OK; -+ } -+ -+ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames -+ mFrames.InsertFrames(this, aPrevFrame, aFrameList); -+ -+ if (aListID != kNoReflowPrincipalList) { -+ PresContext()->PresShell()-> -+ FrameNeedsReflow(this, nsIPresShell::eTreeChange, -+ NS_FRAME_HAS_DIRTY_CHILDREN); -+ - } - return NS_OK; - } -diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp -index 60613ba..44088da 100644 ---- a/layout/tables/nsTableFrame.cpp -+++ b/layout/tables/nsTableFrame.cpp -@@ -2232,6 +2232,7 @@ nsTableFrame::AppendFrames(ChildListID aListID, - InsertColGroups(startColIndex, - nsFrameList::Slice(mColGroups, f, f->GetNextSibling())); - } else if (IsRowGroup(display->mDisplay)) { -+ DrainSelfOverflowList(); // ensure the last frame is in mFrames - // Append the new row group frame to the sibling chain - mFrames.AppendFrame(nullptr, f); - -@@ -2404,6 +2405,7 @@ nsTableFrame::HomogenousInsertFrames(ChildListID aListID, - InsertColGroups(startColIndex, newColgroups); - } else if (IsRowGroup(display->mDisplay)) { - NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); -+ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames - // Insert the frames in the sibling chain - const nsFrameList::Slice& newRowGroups = - mFrames.InsertFrames(nullptr, aPrevFrame, aFrameList); -diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp -index d1c493b..2351de3 100644 ---- a/layout/tables/nsTableRowFrame.cpp -+++ b/layout/tables/nsTableRowFrame.cpp -@@ -182,6 +182,7 @@ nsTableRowFrame::AppendFrames(ChildListID aListID, - { - NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); - -+ DrainSelfOverflowList(); // ensure the last frame is in mFrames - const nsFrameList::Slice& newCells = mFrames.AppendFrames(nullptr, aFrameList); - - // Add the new cell frames to the table -@@ -208,6 +209,7 @@ nsTableRowFrame::InsertFrames(ChildListID aListID, - NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); - NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, - "inserting after sibling frame with different parent"); -+ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames - //Insert Frames in the frame list - const nsFrameList::Slice& newCells = mFrames.InsertFrames(nullptr, aPrevFrame, aFrameList); - -diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp -index 34aaf02..40b349b 100644 ---- a/layout/tables/nsTableRowGroupFrame.cpp -+++ b/layout/tables/nsTableRowGroupFrame.cpp -@@ -1389,6 +1389,7 @@ nsTableRowGroupFrame::AppendFrames(ChildListID aListID, - { - NS_ASSERTION(aListID == kPrincipalList, "unexpected child list"); - -+ DrainSelfOverflowList(); // ensure the last frame is in mFrames - ClearRowCursor(); - - // collect the new row frames in an array -@@ -1430,6 +1431,7 @@ nsTableRowGroupFrame::InsertFrames(ChildListID aListID, - NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this, - "inserting after sibling frame with different parent"); - -+ DrainSelfOverflowList(); // ensure aPrevFrame is in mFrames - ClearRowCursor(); - - // collect the new row frames in an array --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch b/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch deleted file mode 100644 index eb2295f5ac..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e6082e031f0fa2a4a7a63ff124c6f22aeb75393d Mon Sep 17 00:00:00 2001 -From: Terrence Cole -Date: Fri, 10 Apr 2015 08:58:26 -0700 -Subject: [PATCH] Bug 1152177 - Make jsid and Value pre barriers symetrical. - r=jonco, a=abillings - ---- - js/src/gc/Barrier.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/js/src/gc/Barrier.h b/js/src/gc/Barrier.h -index 7efd785..9fc6bd0 100644 ---- a/js/src/gc/Barrier.h -+++ b/js/src/gc/Barrier.h -@@ -1062,6 +1062,8 @@ class BarrieredId - JS_ASSERT(obj == JSID_TO_OBJECT(value)); - } - } else if (JSID_IS_STRING(value)) { -+ if (StringIsPermanentAtom(JSID_TO_STRING(value))) -+ return; - JSString *str = JSID_TO_STRING(value); - JS::shadow::Zone *shadowZone = ShadowZoneOfStringFromAnyThread(str); - if (shadowZone->needsBarrier()) { --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch b/gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch deleted file mode 100644 index 4f119f6fe9..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2710-pt1.patch +++ /dev/null @@ -1,199 +0,0 @@ -From 0bd8486f4088c0845514986f61861688e0be011d Mon Sep 17 00:00:00 2001 -From: Cameron McCormack -Date: Mon, 6 Apr 2015 09:11:55 -0400 -Subject: [PATCH] Bug 1149542 - Part 1: Return early from SVG text layout if we - discover mPositions is not long enough. r=dholbert, a=sledru - ---- - layout/svg/SVGTextFrame.cpp | 59 +++++++++++++++++++++++++++++++-------------- - layout/svg/SVGTextFrame.h | 23 ++++++++++++------ - 2 files changed, 56 insertions(+), 26 deletions(-) - -diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp -index 721e699..45327881 100644 ---- a/layout/svg/SVGTextFrame.cpp -+++ b/layout/svg/SVGTextFrame.cpp -@@ -14,6 +14,7 @@ - #include "gfxTypes.h" - #include "LookAndFeel.h" - #include "mozilla/gfx/2D.h" -+#include "mozilla/Likely.h" - #include "nsAlgorithm.h" - #include "nsBlockFrame.h" - #include "nsCaret.h" -@@ -4316,23 +4317,28 @@ ShouldStartRunAtIndex(const nsTArray& aPositions, - return false; - } - --uint32_t --SVGTextFrame::ResolvePositions(nsIContent* aContent, -- uint32_t aIndex, -- bool aInTextPath, -- bool& aForceStartOfChunk, -- nsTArray& aDeltas) -+bool -+SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, -+ uint32_t& aIndex, -+ bool aInTextPath, -+ bool& aForceStartOfChunk, -+ nsTArray& aDeltas) - { - if (aContent->IsNodeOfType(nsINode::eTEXT)) { - // We found a text node. - uint32_t length = static_cast(aContent)->TextLength(); - if (length) { -+ uint32_t end = aIndex + length; -+ if (MOZ_UNLIKELY(end > mPositions.Length())) { -+ MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " -+ "found by iterating content"); -+ return false; -+ } - if (aForceStartOfChunk) { - // Note this character as starting a new anchored chunk. - mPositions[aIndex].mStartOfChunk = true; - aForceStartOfChunk = false; - } -- uint32_t end = aIndex + length; - while (aIndex < end) { - // Record whether each of these characters should start a new rendered - // run. That is always the case for characters on a text path. -@@ -4345,18 +4351,23 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, - aIndex++; - } - } -- return aIndex; -+ return true; - } - - // Skip past elements that aren't text content elements. - if (!IsTextContentElement(aContent)) { -- return aIndex; -+ return true; - } - - if (aContent->Tag() == nsGkAtoms::textPath) { - // elements are as if they are specified with x="0" y="0", but - // only if they actually have some text content. - if (HasTextContent(aContent)) { -+ if (MOZ_UNLIKELY(aIndex >= mPositions.Length())) { -+ MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " -+ "found by iterating content"); -+ return false; -+ } - mPositions[aIndex].mPosition = gfxPoint(); - mPositions[aIndex].mStartOfChunk = true; - } -@@ -4376,8 +4387,14 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, - rotate = &animatedRotate->GetAnimValue(); - } - -- uint32_t count = GetTextContentLength(aContent); - bool percentages = false; -+ uint32_t count = GetTextContentLength(aContent); -+ -+ if (MOZ_UNLIKELY(aIndex + count > mPositions.Length())) { -+ MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " -+ "found by iterating content"); -+ return false; -+ } - - // New text anchoring chunks start at each character assigned a position - // with x="" or y="", or if we forced one with aForceStartOfChunk due to -@@ -4456,8 +4473,11 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, - for (nsIContent* child = aContent->GetFirstChild(); - child; - child = child->GetNextSibling()) { -- aIndex = ResolvePositions(child, aIndex, inTextPath, aForceStartOfChunk, -- aDeltas); -+ bool ok = ResolvePositionsForNode(child, aIndex, inTextPath, -+ aForceStartOfChunk, aDeltas); -+ if (!ok) { -+ return false; -+ } - } - - if (aContent->Tag() == nsGkAtoms::textPath) { -@@ -4465,7 +4485,7 @@ SVGTextFrame::ResolvePositions(nsIContent* aContent, - aForceStartOfChunk = true; - } - -- return aIndex; -+ return true; - } - - bool -@@ -4501,8 +4521,10 @@ SVGTextFrame::ResolvePositions(nsTArray& aDeltas, - - // Recurse over the content and fill in character positions as we go. - bool forceStartOfChunk = false; -- return ResolvePositions(mContent, 0, aRunPerGlyph, -- forceStartOfChunk, aDeltas) != 0; -+ index = 0; -+ bool ok = ResolvePositionsForNode(mContent, index, aRunPerGlyph, -+ forceStartOfChunk, aDeltas); -+ return ok && index > 0; - } - - void -@@ -4958,9 +4980,10 @@ SVGTextFrame::DoGlyphPositioning() - // Get the x, y, dx, dy, rotate values for the subtree. - nsTArray deltas; - if (!ResolvePositions(deltas, adjustingTextLength)) { -- // If ResolvePositions returned false, it means that there were some -- // characters in the DOM but none of them are displayed. Clear out -- // mPositions so that we don't attempt to do any painting later. -+ // If ResolvePositions returned false, it means either there were some -+ // characters in the DOM but none of them are displayed, or there was -+ // an error in processing mPositions. Clear out mPositions so that we don't -+ // attempt to do any painting later. - mPositions.Clear(); - return; - } -diff --git a/layout/svg/SVGTextFrame.h b/layout/svg/SVGTextFrame.h -index 48951f7..912af8b 100644 ---- a/layout/svg/SVGTextFrame.h -+++ b/layout/svg/SVGTextFrame.h -@@ -505,15 +505,18 @@ private: - * Recursive helper for ResolvePositions below. - * - * @param aContent The current node. -- * @param aIndex The current character index. -+ * @param aIndex (in/out) The current character index. - * @param aInTextPath Whether we are currently under a element. -- * @param aForceStartOfChunk Whether the next character we find should start a -- * new anchored chunk. -- * @return The character index we got up to. -+ * @param aForceStartOfChunk (in/out) Whether the next character we find -+ * should start a new anchored chunk. -+ * @param aDeltas (in/out) Receives the resolved dx/dy values for each -+ * character. -+ * @return false if we discover that mPositions did not have enough -+ * elements; true otherwise. - */ -- uint32_t ResolvePositions(nsIContent* aContent, uint32_t aIndex, -- bool aInTextPath, bool& aForceStartOfChunk, -- nsTArray& aDeltas); -+ bool ResolvePositionsForNode(nsIContent* aContent, uint32_t& aIndex, -+ bool aInTextPath, bool& aForceStartOfChunk, -+ nsTArray& aDeltas); - - /** - * Initializes mPositions with character position information based on -@@ -521,9 +524,13 @@ private: - * was not given for that character. Also fills aDeltas with values based on - * dx/dy attributes. - * -+ * @param aDeltas (in/out) Receives the resolved dx/dy values for each -+ * character. - * @param aRunPerGlyph Whether mPositions should record that a new run begins - * at each glyph. -- * @return True if we recorded any positions. -+ * @return false if we did not record any positions (due to having no -+ * displayed characters) or if we discover that mPositions did not have -+ * enough elements; true otherwise. - */ - bool ResolvePositions(nsTArray& aDeltas, bool aRunPerGlyph); - --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch b/gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch deleted file mode 100644 index 26a10ca2e4..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2710-pt2.patch +++ /dev/null @@ -1,64 +0,0 @@ -From f7c0070831e72735c43beb426ac0c2ce33403f4f Mon Sep 17 00:00:00 2001 -From: Cameron McCormack -Date: Mon, 6 Apr 2015 09:12:06 -0400 -Subject: [PATCH] Bug 1149542 - Part 2: Track undisplayed characters before - empty text frames properly. r=dholbert, a=sledru - ---- - layout/svg/SVGTextFrame.cpp | 29 ++++++++++++++++------------- - 1 file changed, 16 insertions(+), 13 deletions(-) - -diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp -index 45327881..9d331b8 100644 ---- a/layout/svg/SVGTextFrame.cpp -+++ b/layout/svg/SVGTextFrame.cpp -@@ -290,22 +290,25 @@ GetNonEmptyTextFrameAndNode(nsIFrame* aFrame, - nsTextNode*& aTextNode) - { - nsTextFrame* text = do_QueryFrame(aFrame); -- if (!text) { -- return false; -- } -+ bool isNonEmptyTextFrame = text && text->GetContentLength() != 0; - -- nsIContent* content = text->GetContent(); -- NS_ASSERTION(content && content->IsNodeOfType(nsINode::eTEXT), -- "unexpected content type for nsTextFrame"); -+ if (isNonEmptyTextFrame) { -+ nsIContent* content = text->GetContent(); -+ NS_ASSERTION(content && content->IsNodeOfType(nsINode::eTEXT), -+ "unexpected content type for nsTextFrame"); - -- nsTextNode* node = static_cast(content); -- if (node->TextLength() == 0) { -- return false; -+ nsTextNode* node = static_cast(content); -+ MOZ_ASSERT(node->TextLength() != 0, -+ "frame's GetContentLength() should be 0 if the text node " -+ "has no content"); -+ -+ aTextFrame = text; -+ aTextNode = node; - } - -- aTextFrame = text; -- aTextNode = node; -- return true; -+ MOZ_ASSERT(IsNonEmptyTextFrame(aFrame) == isNonEmptyTextFrame, -+ "our logic should agree with IsNonEmptyTextFrame"); -+ return isNonEmptyTextFrame; - } - - /** -@@ -1298,7 +1301,7 @@ GetUndisplayedCharactersBeforeFrame(nsTextFrame* aFrame) - /** - * Traverses the nsTextFrames for an SVGTextFrame and records a - * TextNodeCorrespondenceProperty on each for the number of undisplayed DOM -- * characters between each frame. This is done by iterating simultaenously -+ * characters between each frame. This is done by iterating simultaneously - * over the nsTextNodes and nsTextFrames and noting when nsTextNodes (or - * parts of them) are skipped when finding the next nsTextFrame. - */ --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch b/gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch deleted file mode 100644 index 6759506213..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2710-pt3.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 2cda46e6158a459b56b392c8e389b055fdf740ca Mon Sep 17 00:00:00 2001 -From: Ryan VanderMeulen -Date: Mon, 6 Apr 2015 22:59:41 -0400 -Subject: [PATCH] Bug 1149542 - Replace MOZ_ASSERT_UNREACHABLE with MOZ_ASSERT. - r=dholbert, a=bustage - ---- - layout/svg/SVGTextFrame.cpp | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp -index 9d331b8..e7b7275 100644 ---- a/layout/svg/SVGTextFrame.cpp -+++ b/layout/svg/SVGTextFrame.cpp -@@ -4333,8 +4333,8 @@ SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, - if (length) { - uint32_t end = aIndex + length; - if (MOZ_UNLIKELY(end > mPositions.Length())) { -- MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " -- "found by iterating content"); -+ MOZ_ASSERT(false, "length of mPositions does not match characters " -+ "found by iterating content"); - return false; - } - if (aForceStartOfChunk) { -@@ -4367,8 +4367,8 @@ SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, - // only if they actually have some text content. - if (HasTextContent(aContent)) { - if (MOZ_UNLIKELY(aIndex >= mPositions.Length())) { -- MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " -- "found by iterating content"); -+ MOZ_ASSERT(false, "length of mPositions does not match characters " -+ "found by iterating content"); - return false; - } - mPositions[aIndex].mPosition = gfxPoint(); -@@ -4394,8 +4394,8 @@ SVGTextFrame::ResolvePositionsForNode(nsIContent* aContent, - uint32_t count = GetTextContentLength(aContent); - - if (MOZ_UNLIKELY(aIndex + count > mPositions.Length())) { -- MOZ_ASSERT_UNREACHABLE("length of mPositions does not match characters " -- "found by iterating content"); -+ MOZ_ASSERT(false, "length of mPositions does not match characters " -+ "found by iterating content"); - return false; - } - --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch b/gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch deleted file mode 100644 index 9e52759ae8..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2713-pt1.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 2b1c90da3e849e1c9d7457658290aa8eb01d0fa9 Mon Sep 17 00:00:00 2001 -From: Mats Palmgren -Date: Thu, 16 Apr 2015 09:04:19 +0000 -Subject: [PATCH] Bug 1153478 - Part 1: Add nsInlineFrame::StealFrame and make - it deal with being called on the wrong parent for aChild (due to lazy - reparenting). r=roc, a=sledru - ---- - layout/generic/nsContainerFrame.cpp | 7 +++---- - layout/generic/nsInlineFrame.cpp | 39 +++++++++++++++++++++++++++++++++++++ - layout/generic/nsInlineFrame.h | 4 +++- - 3 files changed, 45 insertions(+), 5 deletions(-) - -diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp -index 3ffcba7..34878af 100644 ---- a/layout/generic/nsContainerFrame.cpp -+++ b/layout/generic/nsContainerFrame.cpp -@@ -172,13 +172,12 @@ nsContainerFrame::RemoveFrame(ChildListID aListID, - nsIPresShell* shell = PresContext()->PresShell(); - nsContainerFrame* lastParent = nullptr; - while (aOldFrame) { -- //XXXfr probably should use StealFrame here. I'm not sure if we need to -- // check the overflow lists atm, but we'll need a prescontext lookup -- // for overflow containers once we can split abspos elements with -- // inline containing blocks. - nsIFrame* oldFrameNextContinuation = aOldFrame->GetNextContinuation(); - nsContainerFrame* parent = - static_cast(aOldFrame->GetParent()); -+ // Please note that 'parent' may not actually be where 'aOldFrame' lives. -+ // We really MUST use StealFrame() and nothing else here. -+ // @see nsInlineFrame::StealFrame for details. - parent->StealFrame(aOldFrame, true); - aOldFrame->Destroy(); - aOldFrame = oldFrameNextContinuation; -diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp -index 526041e..a392a15 100644 ---- a/layout/generic/nsInlineFrame.cpp -+++ b/layout/generic/nsInlineFrame.cpp -@@ -172,6 +172,45 @@ nsInlineFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset, - return CONTINUE; - } - -+nsresult -+nsInlineFrame::StealFrame(nsIFrame* aChild, -+ bool aForceNormal) -+{ -+ if (aChild->HasAnyStateBits(NS_FRAME_IS_OVERFLOW_CONTAINER) && -+ !aForceNormal) { -+ return nsContainerFrame::StealFrame(aChild, aForceNormal); -+ } -+ -+ nsInlineFrame* parent = this; -+ bool removed = false; -+ do { -+ removed = parent->mFrames.StartRemoveFrame(aChild); -+ if (removed) { -+ break; -+ } -+ -+ // We didn't find the child in our principal child list. -+ // Maybe it's on the overflow list? -+ nsFrameList* frameList = parent->GetOverflowFrames(); -+ if (frameList) { -+ removed = frameList->ContinueRemoveFrame(aChild); -+ if (frameList->IsEmpty()) { -+ parent->DestroyOverflowList(); -+ } -+ if (removed) { -+ break; -+ } -+ } -+ -+ // Due to our "lazy reparenting" optimization 'aChild' might not actually -+ // be on any of our child lists, but instead in one of our next-in-flows. -+ parent = static_cast(parent->GetNextInFlow()); -+ } while (parent); -+ -+ MOZ_ASSERT(removed, "nsInlineFrame::StealFrame: can't find aChild"); -+ return removed ? NS_OK : NS_ERROR_UNEXPECTED; -+} -+ - void - nsInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, - const nsRect& aDirtyRect, -diff --git a/layout/generic/nsInlineFrame.h b/layout/generic/nsInlineFrame.h -index 1a9899e..3e49241 100644 ---- a/layout/generic/nsInlineFrame.h -+++ b/layout/generic/nsInlineFrame.h -@@ -61,7 +61,9 @@ public: - - virtual FrameSearchResult PeekOffsetCharacter(bool aForward, int32_t* aOffset, - bool aRespectClusters = true) MOZ_OVERRIDE; -- -+ -+ virtual nsresult StealFrame(nsIFrame* aChild, bool aForceNormal) MOZ_OVERRIDE; -+ - // nsIHTMLReflow overrides - virtual void AddInlineMinWidth(nsRenderingContext *aRenderingContext, - InlineMinWidthData *aData) MOZ_OVERRIDE; --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch b/gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch deleted file mode 100644 index b1f2adde47..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2713-pt2.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d84ed2990dd2304fef752213f1908280ff24d77c Mon Sep 17 00:00:00 2001 -From: Mats Palmgren -Date: Thu, 16 Apr 2015 09:04:19 +0000 -Subject: [PATCH] Bug 1153478 - Part 2: Remove useless assertions. r=roc, - a=sledru - ---- - layout/generic/nsContainerFrame.cpp | 1 - - layout/generic/nsInlineFrame.cpp | 3 --- - 2 files changed, 4 deletions(-) - -diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp -index 34878af..b95bddd 100644 ---- a/layout/generic/nsContainerFrame.cpp -+++ b/layout/generic/nsContainerFrame.cpp -@@ -1516,7 +1516,6 @@ nsContainerFrame::DrainSelfOverflowList() - { - AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); - if (overflowFrames) { -- NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames"); - mFrames.AppendFrames(nullptr, *overflowFrames); - return true; - } -diff --git a/layout/generic/nsInlineFrame.cpp b/layout/generic/nsInlineFrame.cpp -index a392a15..e0922bb 100644 ---- a/layout/generic/nsInlineFrame.cpp -+++ b/layout/generic/nsInlineFrame.cpp -@@ -449,7 +449,6 @@ nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags, - { - AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); - if (overflowFrames) { -- NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames"); - // The frames on our own overflowlist may have been pushed by a - // previous lazilySetParentPointer Reflow so we need to ensure the - // correct parent pointer. This is sometimes skipped by Reflow. -@@ -1157,8 +1156,6 @@ nsFirstLineFrame::DrainSelfOverflowList() - { - AutoFrameListPtr overflowFrames(PresContext(), StealOverflowFrames()); - if (overflowFrames) { -- NS_ASSERTION(mFrames.NotEmpty(), "overflow list w/o frames"); -- - bool result = !overflowFrames->IsEmpty(); - const nsFrameList::Slice& newFrames = - mFrames.AppendFrames(nullptr, *overflowFrames); --- -2.2.1 - diff --git a/gnu/packages/patches/icecat-CVE-2015-2716.patch b/gnu/packages/patches/icecat-CVE-2015-2716.patch deleted file mode 100644 index ce036a0921..0000000000 --- a/gnu/packages/patches/icecat-CVE-2015-2716.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 9dcb4563847cb6e2a8112dca03d2684907f96313 Mon Sep 17 00:00:00 2001 -From: Eric Rahm -Date: Fri, 10 Apr 2015 15:50:23 -0700 -Subject: [PATCH] Bug 1140537 - Sanity check size calculations. r=peterv, - a=abillings - ---- - parser/expat/lib/xmlparse.c | 23 +++++++++++++++++++++-- - 1 file changed, 21 insertions(+), 2 deletions(-) - -diff --git a/parser/expat/lib/xmlparse.c b/parser/expat/lib/xmlparse.c -index 70acf1a..436b735 100644 ---- a/parser/expat/lib/xmlparse.c -+++ b/parser/expat/lib/xmlparse.c -@@ -1651,6 +1651,12 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal) - void * XMLCALL - XML_GetBuffer(XML_Parser parser, int len) - { -+/* BEGIN MOZILLA CHANGE (sanity check len) */ -+ if (len < 0) { -+ errorCode = XML_ERROR_NO_MEMORY; -+ return NULL; -+ } -+/* END MOZILLA CHANGE */ - switch (ps_parsing) { - case XML_SUSPENDED: - errorCode = XML_ERROR_SUSPENDED; -@@ -1662,8 +1668,13 @@ XML_GetBuffer(XML_Parser parser, int len) - } - - if (len > bufferLim - bufferEnd) { -- /* FIXME avoid integer overflow */ - int neededSize = len + (int)(bufferEnd - bufferPtr); -+/* BEGIN MOZILLA CHANGE (sanity check neededSize) */ -+ if (neededSize < 0) { -+ errorCode = XML_ERROR_NO_MEMORY; -+ return NULL; -+ } -+/* END MOZILLA CHANGE */ - #ifdef XML_CONTEXT_BYTES - int keep = (int)(bufferPtr - buffer); - -@@ -1692,7 +1703,15 @@ XML_GetBuffer(XML_Parser parser, int len) - bufferSize = INIT_BUFFER_SIZE; - do { - bufferSize *= 2; -- } while (bufferSize < neededSize); -+/* BEGIN MOZILLA CHANGE (prevent infinite loop on overflow) */ -+ } while (bufferSize < neededSize && bufferSize > 0); -+/* END MOZILLA CHANGE */ -+/* BEGIN MOZILLA CHANGE (sanity check bufferSize) */ -+ if (bufferSize <= 0) { -+ errorCode = XML_ERROR_NO_MEMORY; -+ return NULL; -+ } -+/* END MOZILLA CHANGE */ - newBuf = (char *)MALLOC(bufferSize); - if (newBuf == 0) { - errorCode = XML_ERROR_NO_MEMORY; --- -2.2.1 - -- cgit v1.2.3 From 3dbb0e5f8b9e8445818ca31861488666b948ce50 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 10 Jun 2015 15:11:48 -0400 Subject: gnu: qemu: Add fix for CVE-2015-3209. * gnu/packages/patches/qemu-CVE-2015-3209.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/qemu.scm (qemu): Add patch. --- gnu-system.am | 1 + gnu/packages/patches/qemu-CVE-2015-3209.patch | 49 +++++++++++++++++++++++++++ gnu/packages/qemu.scm | 3 +- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qemu-CVE-2015-3209.patch (limited to 'gnu/packages/patches') diff --git a/gnu-system.am b/gnu-system.am index 3073fef498..978e839bfa 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -527,6 +527,7 @@ dist_patch_DATA = \ gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch \ gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ + gnu/packages/patches/qemu-CVE-2015-3209.patch \ gnu/packages/patches/qemu-CVE-2015-3456.patch \ gnu/packages/patches/qt4-ldflags.patch \ gnu/packages/patches/qt4-tests.patch \ diff --git a/gnu/packages/patches/qemu-CVE-2015-3209.patch b/gnu/packages/patches/qemu-CVE-2015-3209.patch new file mode 100644 index 0000000000..0bb726698c --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2015-3209.patch @@ -0,0 +1,49 @@ +From 9f7c594c006289ad41169b854d70f5da6e400a2a Mon Sep 17 00:00:00 2001 +From: Petr Matousek +Date: Sun, 24 May 2015 10:53:44 +0200 +Subject: [PATCH] pcnet: force the buffer access to be in bounds during tx + +4096 is the maximum length per TMD and it is also currently the size of +the relay buffer pcnet driver uses for sending the packet data to QEMU +for further processing. With packet spanning multiple TMDs it can +happen that the overall packet size will be bigger than sizeof(buffer), +which results in memory corruption. + +Fix this by only allowing to queue maximum sizeof(buffer) bytes. + +This is CVE-2015-3209. + +[Fixed 3-space indentation to QEMU's 4-space coding standard. +--Stefan] + +Signed-off-by: Petr Matousek +Reported-by: Matt Tait +Reviewed-by: Peter Maydell +Reviewed-by: Stefan Hajnoczi +Signed-off-by: Stefan Hajnoczi +--- + hw/net/pcnet.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c +index bdfd38f..68b9981 100644 +--- a/hw/net/pcnet.c ++++ b/hw/net/pcnet.c +@@ -1241,6 +1241,14 @@ static void pcnet_transmit(PCNetState *s) + } + + bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT); ++ ++ /* if multi-tmd packet outsizes s->buffer then skip it silently. ++ Note: this is not what real hw does */ ++ if (s->xmit_pos + bcnt > sizeof(s->buffer)) { ++ s->xmit_pos = -1; ++ goto txdone; ++ } ++ + s->phys_mem_read(s->dma_opaque, PHYSADDR(s, tmd.tbadr), + s->buffer + s->xmit_pos, bcnt, CSR_BSWP(s)); + s->xmit_pos += bcnt; +-- +2.2.1 + diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm index 717310209e..27a2d2e8ba 100644 --- a/gnu/packages/qemu.scm +++ b/gnu/packages/qemu.scm @@ -52,7 +52,8 @@ (sha256 (base32 "120m53c3p28qxmfzllicjzr8syjv6v4d9rsyrgkp7gnmcgvvgfmn")) - (patches (list (search-patch "qemu-CVE-2015-3456.patch"))))) + (patches (map search-patch '("qemu-CVE-2015-3209.patch" + "qemu-CVE-2015-3456.patch"))))) (build-system gnu-build-system) (arguments '(#:phases (alist-replace -- cgit v1.2.3