From 03d0e2d2b9f9cc3be8e871842c11df9453e903bd Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Thu, 21 Apr 2016 18:07:52 +0200 Subject: build: Move 'Makefile' fragments to subdirectories. This follows a convention used by some other GNU packages like Autoconf, Bison, Coreutils, and Gnulib. * doc.am: Rename to ... * doc/local.mk: ... this. * emacs.am: Rename to ... * emacs/local.mk: ... this. * gnu-system.am: Rename to ... * gnu/local.mk: ... this. * daemon.am: Rename to ... * nix/local.mk: ... this. * Makefile.am: Adapt to them. * doc/guix.texi (Porting to a New Platform): Adapt documentation. * guix/config.scm.in (%state-directory, %config-directory): Adapt comments. * emacs/guix-config.el.in (guix-config-state-directory): Likewise. --- gnu/local.mk | 875 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 875 insertions(+) create mode 100644 gnu/local.mk (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk new file mode 100644 index 0000000000..d58155a1b5 --- /dev/null +++ b/gnu/local.mk @@ -0,0 +1,875 @@ +# GNU Guix --- Functional package management for GNU +# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès +# Copyright © 2013, 2014, 2015, 2016 Andreas Enge +# Copyright © 2016 Mathieu Lirzin +# Copyright © 2013, 2014, 2015, 2016 Mark H Weaver +# Copyright © 2016 Chris Marusich +# Copyright © 2016 Kei Yamashita +# +# 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 . + +# Definitions for the GNU System: package modules, patches, bootstrap +# binaries. + +GNU_SYSTEM_MODULES = \ + gnu.scm \ + gnu/artwork.scm \ + gnu/packages.scm \ + gnu/packages/abduco.scm \ + gnu/packages/abiword.scm \ + gnu/packages/acct.scm \ + gnu/packages/acl.scm \ + gnu/packages/admin.scm \ + gnu/packages/adns.scm \ + gnu/packages/algebra.scm \ + gnu/packages/aidc.scm \ + gnu/packages/animation.scm \ + gnu/packages/anthy.scm \ + gnu/packages/apl.scm \ + gnu/packages/apr.scm \ + gnu/packages/asciidoc.scm \ + gnu/packages/aspell.scm \ + gnu/packages/attr.scm \ + gnu/packages/audacity.scm \ + gnu/packages/audio.scm \ + gnu/packages/augeas.scm \ + gnu/packages/autogen.scm \ + gnu/packages/autotools.scm \ + gnu/packages/avahi.scm \ + gnu/packages/avr.scm \ + gnu/packages/backup.scm \ + gnu/packages/base.scm \ + gnu/packages/bash.scm \ + gnu/packages/bdw-gc.scm \ + gnu/packages/bioinformatics.scm \ + gnu/packages/bittorrent.scm \ + gnu/packages/bison.scm \ + gnu/packages/boost.scm \ + gnu/packages/bootstrap.scm \ + gnu/packages/busybox.scm \ + gnu/packages/c.scm \ + gnu/packages/calcurse.scm \ + gnu/packages/ccache.scm \ + gnu/packages/cdrom.scm \ + gnu/packages/certs.scm \ + gnu/packages/check.scm \ + gnu/packages/ci.scm \ + gnu/packages/cmake.scm \ + gnu/packages/code.scm \ + gnu/packages/commencement.scm \ + gnu/packages/compression.scm \ + gnu/packages/conkeror.scm \ + gnu/packages/conky.scm \ + gnu/packages/cook.scm \ + gnu/packages/cpio.scm \ + gnu/packages/cppi.scm \ + gnu/packages/cross-base.scm \ + gnu/packages/crypto.scm \ + gnu/packages/cryptsetup.scm \ + gnu/packages/cups.scm \ + gnu/packages/curl.scm \ + gnu/packages/cyrus-sasl.scm \ + gnu/packages/databases.scm \ + gnu/packages/datamash.scm \ + gnu/packages/datastructures.scm \ + gnu/packages/dav.scm \ + gnu/packages/dc.scm \ + gnu/packages/debug.scm \ + gnu/packages/dejagnu.scm \ + gnu/packages/dico.scm \ + gnu/packages/dictionaries.scm \ + gnu/packages/dillo.scm \ + gnu/packages/disk.scm \ + gnu/packages/djvu.scm \ + gnu/packages/dns.scm \ + gnu/packages/docbook.scm \ + gnu/packages/docker.scm \ + gnu/packages/doxygen.scm \ + gnu/packages/dunst.scm \ + gnu/packages/dvtm.scm \ + gnu/packages/ebook.scm \ + gnu/packages/ed.scm \ + gnu/packages/elf.scm \ + gnu/packages/emacs.scm \ + gnu/packages/enchant.scm \ + gnu/packages/engineering.scm \ + gnu/packages/enlightenment.scm \ + gnu/packages/fcitx.scm \ + gnu/packages/feh.scm \ + gnu/packages/figlet.scm \ + gnu/packages/file.scm \ + gnu/packages/finance.scm \ + gnu/packages/firmware.scm \ + gnu/packages/fish.scm \ + gnu/packages/flashing-tools.scm \ + gnu/packages/flex.scm \ + gnu/packages/fltk.scm \ + gnu/packages/fonts.scm \ + gnu/packages/fontutils.scm \ + gnu/packages/freedesktop.scm \ + gnu/packages/freeipmi.scm \ + gnu/packages/ftp.scm \ + gnu/packages/fribidi.scm \ + gnu/packages/fvwm.scm \ + gnu/packages/game-development.scm \ + gnu/packages/games.scm \ + gnu/packages/gawk.scm \ + gnu/packages/gcal.scm \ + gnu/packages/gcc.scm \ + gnu/packages/gd.scm \ + gnu/packages/gdb.scm \ + gnu/packages/geeqie.scm \ + gnu/packages/gettext.scm \ + gnu/packages/ghostscript.scm \ + gnu/packages/gimp.scm \ + gnu/packages/gkrellm.scm \ + gnu/packages/gl.scm \ + gnu/packages/glib.scm \ + gnu/packages/gnome.scm \ + gnu/packages/gnu-doc.scm \ + gnu/packages/gnucash.scm \ + gnu/packages/gnunet.scm \ + gnu/packages/gnupg.scm \ + gnu/packages/gnustep.scm \ + gnu/packages/gnuzilla.scm \ + gnu/packages/gnu-pw-mgr.scm \ + gnu/packages/gperf.scm \ + gnu/packages/gprolog.scm \ + gnu/packages/gps.scm \ + gnu/packages/graphics.scm \ + gnu/packages/graphviz.scm \ + gnu/packages/groff.scm \ + gnu/packages/grub.scm \ + gnu/packages/grue-hunter.scm \ + gnu/packages/gsasl.scm \ + gnu/packages/gstreamer.scm \ + gnu/packages/gtk.scm \ + gnu/packages/guile.scm \ + gnu/packages/guile-wm.scm \ + gnu/packages/gv.scm \ + gnu/packages/gxmessage.scm \ + gnu/packages/haskell.scm \ + gnu/packages/hugs.scm \ + gnu/packages/hurd.scm \ + gnu/packages/ibus.scm \ + gnu/packages/icu4c.scm \ + gnu/packages/idutils.scm \ + gnu/packages/image.scm \ + gnu/packages/imagemagick.scm \ + gnu/packages/indent.scm \ + gnu/packages/inklingreader.scm \ + gnu/packages/inkscape.scm \ + gnu/packages/irc.scm \ + gnu/packages/iso-codes.scm \ + gnu/packages/java.scm \ + gnu/packages/jemalloc.scm \ + gnu/packages/jrnl.scm \ + gnu/packages/julia.scm \ + gnu/packages/kde.scm \ + gnu/packages/kde-frameworks.scm \ + gnu/packages/key-mon.scm \ + gnu/packages/kodi.scm \ + gnu/packages/language.scm \ + gnu/packages/ldc.scm \ + gnu/packages/lego.scm \ + gnu/packages/less.scm \ + gnu/packages/lesstif.scm \ + gnu/packages/libcanberra.scm \ + gnu/packages/libdaemon.scm \ + gnu/packages/libedit.scm \ + gnu/packages/libevent.scm \ + gnu/packages/libffcall.scm \ + gnu/packages/libffi.scm \ + gnu/packages/libftdi.scm \ + gnu/packages/calendar.scm \ + gnu/packages/libidn.scm \ + gnu/packages/libphidget.scm \ + gnu/packages/libreoffice.scm \ + gnu/packages/libsigsegv.scm \ + gnu/packages/libunistring.scm \ + gnu/packages/libusb.scm \ + gnu/packages/libunwind.scm \ + gnu/packages/libupnp.scm \ + gnu/packages/lightning.scm \ + gnu/packages/links.scm \ + gnu/packages/linux.scm \ + gnu/packages/lirc.scm \ + gnu/packages/lisp.scm \ + gnu/packages/llvm.scm \ + gnu/packages/lout.scm \ + gnu/packages/lsh.scm \ + gnu/packages/lsof.scm \ + gnu/packages/lua.scm \ + gnu/packages/lxde.scm \ + gnu/packages/lxqt.scm \ + gnu/packages/lynx.scm \ + gnu/packages/m4.scm \ + gnu/packages/machine-learning.scm \ + gnu/packages/man.scm \ + gnu/packages/mail.scm \ + gnu/packages/make-bootstrap.scm \ + gnu/packages/markdown.scm \ + gnu/packages/marst.scm \ + gnu/packages/mate.scm \ + gnu/packages/maths.scm \ + gnu/packages/mc.scm \ + gnu/packages/mcrypt.scm \ + gnu/packages/messaging.scm \ + gnu/packages/mg.scm \ + gnu/packages/mit-krb5.scm \ + gnu/packages/moe.scm \ + gnu/packages/moreutils.scm \ + gnu/packages/mpd.scm \ + gnu/packages/mp3.scm \ + gnu/packages/mpi.scm \ + gnu/packages/multiprecision.scm \ + gnu/packages/music.scm \ + gnu/packages/mtools.scm \ + gnu/packages/nano.scm \ + gnu/packages/ncdu.scm \ + gnu/packages/ncurses.scm \ + gnu/packages/netpbm.scm \ + gnu/packages/nettle.scm \ + gnu/packages/networking.scm \ + gnu/packages/ninja.scm \ + gnu/packages/node.scm \ + gnu/packages/noweb.scm \ + gnu/packages/ntp.scm \ + gnu/packages/nutrition.scm \ + gnu/packages/nvi.scm \ + gnu/packages/ocaml.scm \ + gnu/packages/ocr.scm \ + gnu/packages/onc-rpc.scm \ + gnu/packages/openbox.scm \ + gnu/packages/openldap.scm \ + gnu/packages/openstack.scm \ + gnu/packages/orpheus.scm \ + gnu/packages/ots.scm \ + gnu/packages/owncloud.scm \ + gnu/packages/package-management.scm \ + gnu/packages/parallel.scm \ + gnu/packages/password-utils.scm \ + gnu/packages/patchutils.scm \ + gnu/packages/pciutils.scm \ + gnu/packages/pcre.scm \ + gnu/packages/pdf.scm \ + gnu/packages/pem.scm \ + gnu/packages/perl.scm \ + gnu/packages/photo.scm \ + gnu/packages/pkg-config.scm \ + gnu/packages/plotutils.scm \ + gnu/packages/polkit.scm \ + gnu/packages/popt.scm \ + gnu/packages/pth.scm \ + gnu/packages/pulseaudio.scm \ + gnu/packages/pumpio.scm \ + gnu/packages/pretty-print.scm \ + gnu/packages/protobuf.scm \ + gnu/packages/pv.scm \ + gnu/packages/python.scm \ + gnu/packages/qemu.scm \ + gnu/packages/qt.scm \ + gnu/packages/ragel.scm \ + gnu/packages/ratpoison.scm \ + gnu/packages/rc.scm \ + gnu/packages/rdesktop.scm \ + gnu/packages/rdf.scm \ + gnu/packages/readline.scm \ + gnu/packages/rrdtool.scm \ + gnu/packages/rsync.scm \ + gnu/packages/ruby.scm \ + gnu/packages/rush.scm \ + gnu/packages/samba.scm \ + gnu/packages/sawfish.scm \ + gnu/packages/scanner.scm \ + gnu/packages/scheme.scm \ + gnu/packages/screen.scm \ + gnu/packages/scribus.scm \ + gnu/packages/sdl.scm \ + gnu/packages/search.scm \ + gnu/packages/serialization.scm \ + gnu/packages/serveez.scm \ + gnu/packages/shishi.scm \ + gnu/packages/skarnet.scm \ + gnu/packages/skribilo.scm \ + gnu/packages/slang.scm \ + gnu/packages/slim.scm \ + gnu/packages/smalltalk.scm \ + gnu/packages/ssh.scm \ + gnu/packages/stalonetray.scm \ + gnu/packages/statistics.scm \ + gnu/packages/suckless.scm \ + gnu/packages/swig.scm \ + gnu/packages/sxiv.scm \ + gnu/packages/synergy.scm \ + gnu/packages/task-management.scm \ + gnu/packages/tbb.scm \ + gnu/packages/tcl.scm \ + gnu/packages/tcsh.scm \ + gnu/packages/telephony.scm \ + gnu/packages/terminals.scm \ + gnu/packages/texinfo.scm \ + gnu/packages/texlive.scm \ + gnu/packages/textutils.scm \ + gnu/packages/time.scm \ + gnu/packages/tls.scm \ + 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 \ + gnu/packages/valgrind.scm \ + gnu/packages/version-control.scm \ + gnu/packages/video.scm \ + gnu/packages/vim.scm \ + gnu/packages/vpn.scm \ + gnu/packages/vtk.scm \ + gnu/packages/w3m.scm \ + gnu/packages/wdiff.scm \ + gnu/packages/web.scm \ + gnu/packages/webkit.scm \ + gnu/packages/wget.scm \ + gnu/packages/wicd.scm \ + gnu/packages/wine.scm \ + gnu/packages/wm.scm \ + gnu/packages/wordnet.scm \ + gnu/packages/wv.scm \ + gnu/packages/wxwidgets.scm \ + gnu/packages/xfig.scm \ + gnu/packages/xiph.scm \ + gnu/packages/xml.scm \ + gnu/packages/xnee.scm \ + gnu/packages/xdisorg.scm \ + gnu/packages/xorg.scm \ + gnu/packages/xfce.scm \ + gnu/packages/yasm.scm \ + gnu/packages/yubico.scm \ + gnu/packages/zile.scm \ + gnu/packages/zip.scm \ + gnu/packages/zsh.scm \ + \ + gnu/services.scm \ + gnu/services/avahi.scm \ + gnu/services/base.scm \ + gnu/services/databases.scm \ + gnu/services/dbus.scm \ + gnu/services/desktop.scm \ + gnu/services/lirc.scm \ + gnu/services/mail.scm \ + gnu/services/networking.scm \ + gnu/services/shepherd.scm \ + gnu/services/herd.scm \ + gnu/services/ssh.scm \ + gnu/services/web.scm \ + gnu/services/xorg.scm \ + \ + gnu/system.scm \ + gnu/system/file-systems.scm \ + gnu/system/grub.scm \ + gnu/system/install.scm \ + gnu/system/linux-container.scm \ + gnu/system/linux-initrd.scm \ + gnu/system/locale.scm \ + gnu/system/mapped-devices.scm \ + gnu/system/nss.scm \ + gnu/system/pam.scm \ + gnu/system/shadow.scm \ + gnu/system/vm.scm \ + \ + gnu/build/activation.scm \ + gnu/build/file-systems.scm \ + gnu/build/install.scm \ + gnu/build/linux-boot.scm \ + gnu/build/linux-container.scm \ + gnu/build/linux-initrd.scm \ + gnu/build/linux-modules.scm \ + gnu/build/vm.scm + + +patchdir = $(guilemoduledir)/gnu/packages/patches +dist_patch_DATA = \ + gnu/packages/patches/abiword-explictly-cast-bools.patch \ + gnu/packages/patches/abiword-wmf-version-lookup-fix.patch \ + gnu/packages/patches/acl-hurd-path-max.patch \ + gnu/packages/patches/aegis-constness-error.patch \ + gnu/packages/patches/aegis-perl-tempdir1.patch \ + gnu/packages/patches/aegis-perl-tempdir2.patch \ + gnu/packages/patches/aegis-test-fixup-1.patch \ + gnu/packages/patches/aegis-test-fixup-2.patch \ + gnu/packages/patches/agg-am_c_prototype.patch \ + gnu/packages/patches/alsa-lib-mips-atomic-fix.patch \ + gnu/packages/patches/apr-skip-getservbyname-test.patch \ + gnu/packages/patches/arb-ldconfig.patch \ + gnu/packages/patches/asymptote-gsl2.patch \ + gnu/packages/patches/ath9k-htc-firmware-binutils.patch \ + gnu/packages/patches/ath9k-htc-firmware-gcc.patch \ + gnu/packages/patches/ath9k-htc-firmware-objcopy.patch \ + gnu/packages/patches/audacity-fix-ffmpeg-binding.patch \ + gnu/packages/patches/automake-skip-amhello-tests.patch \ + gnu/packages/patches/automake-regexp-syntax.patch \ + gnu/packages/patches/avahi-localstatedir.patch \ + gnu/packages/patches/avidemux-install-to-lib.patch \ + gnu/packages/patches/avrdude-fix-libusb.patch \ + gnu/packages/patches/bash-completion-directories.patch \ + 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/byobu-writable-status.patch \ + gnu/packages/patches/calibre-drop-unrar.patch \ + gnu/packages/patches/calibre-no-updates-dialog.patch \ + gnu/packages/patches/cdparanoia-fpic.patch \ + gnu/packages/patches/chmlib-inttypes.patch \ + gnu/packages/patches/clang-libc-search-path.patch \ + gnu/packages/patches/clucene-pkgconfig.patch \ + gnu/packages/patches/cmake-fix-tests.patch \ + gnu/packages/patches/cpio-gets-undeclared.patch \ + gnu/packages/patches/cpio-CVE-2016-2037.patch \ + gnu/packages/patches/cpufrequtils-fix-aclocal.patch \ + gnu/packages/patches/crda-optional-gcrypt.patch \ + gnu/packages/patches/crossmap-allow-system-pysam.patch \ + gnu/packages/patches/csound-header-ordering.patch \ + gnu/packages/patches/cssc-gets-undeclared.patch \ + gnu/packages/patches/cssc-missing-include.patch \ + gnu/packages/patches/clucene-contribs-lib.patch \ + gnu/packages/patches/cursynth-wave-rand.patch \ + gnu/packages/patches/dbus-helper-search-path.patch \ + gnu/packages/patches/dealii-p4est-interface.patch \ + gnu/packages/patches/devil-fix-libpng.patch \ + gnu/packages/patches/dico-libtool-deterministic.patch \ + gnu/packages/patches/diffutils-gets-undeclared.patch \ + gnu/packages/patches/dfu-programmer-fix-libusb.patch \ + gnu/packages/patches/doxygen-test.patch \ + gnu/packages/patches/duplicity-piped-password.patch \ + gnu/packages/patches/duplicity-test_selection-tmp.patch \ + gnu/packages/patches/elfutils-tests-ptrace.patch \ + gnu/packages/patches/einstein-build.patch \ + gnu/packages/patches/emacs-constants-lisp-like.patch \ + gnu/packages/patches/emacs-exec-path.patch \ + gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ + gnu/packages/patches/emacs-source-date-epoch.patch \ + gnu/packages/patches/eudev-rules-directory.patch \ + gnu/packages/patches/evilwm-lost-focus-bug.patch \ + gnu/packages/patches/expat-CVE-2015-1283.patch \ + gnu/packages/patches/fastcap-mulGlobal.patch \ + gnu/packages/patches/fastcap-mulSetup.patch \ + gnu/packages/patches/fasthenry-spAllocate.patch \ + gnu/packages/patches/fasthenry-spBuild.patch \ + gnu/packages/patches/fasthenry-spUtils.patch \ + gnu/packages/patches/fasthenry-spSolve.patch \ + gnu/packages/patches/fasthenry-spFactor.patch \ + gnu/packages/patches/findutils-localstatedir.patch \ + gnu/packages/patches/findutils-test-xargs.patch \ + gnu/packages/patches/flashrom-use-libftdi1.patch \ + gnu/packages/patches/flint-ldconfig.patch \ + gnu/packages/patches/fltk-shared-lib-defines.patch \ + gnu/packages/patches/fontforge-svg-modtime.patch \ + gnu/packages/patches/freeimage-CVE-2015-0852.patch \ + gnu/packages/patches/gawk-fts-test.patch \ + gnu/packages/patches/gawk-shell.patch \ + gnu/packages/patches/gcc-arm-link-spec-fix.patch \ + gnu/packages/patches/gcc-cross-environment-variables.patch \ + gnu/packages/patches/gcc-libvtv-runpath.patch \ + gnu/packages/patches/gcc-5.0-libvtv-runpath.patch \ + gnu/packages/patches/geoclue-config.patch \ + gnu/packages/patches/ghostscript-CVE-2015-3228.patch \ + gnu/packages/patches/ghostscript-runpath.patch \ + gnu/packages/patches/glib-networking-ssl-cert-file.patch \ + gnu/packages/patches/glib-tests-desktop.patch \ + gnu/packages/patches/glib-tests-homedir.patch \ + gnu/packages/patches/glib-tests-prlimit.patch \ + gnu/packages/patches/glib-tests-timer.patch \ + gnu/packages/patches/glib-tests-gapplication.patch \ + gnu/packages/patches/glibc-CVE-2015-7547.patch \ + gnu/packages/patches/glibc-bootstrap-system.patch \ + gnu/packages/patches/glibc-hurd-extern-inline.patch \ + gnu/packages/patches/glibc-ldd-x86_64.patch \ + gnu/packages/patches/glibc-locales.patch \ + gnu/packages/patches/glibc-locale-incompatibility.patch \ + gnu/packages/patches/glibc-o-largefile.patch \ + gnu/packages/patches/glibc-versioned-locpath.patch \ + gnu/packages/patches/gmp-arm-asm-nothumb.patch \ + gnu/packages/patches/gmp-faulty-test.patch \ + gnu/packages/patches/gnucash-price-quotes-perl.patch \ + gnu/packages/patches/gnupg-simple-query-ignore-status-messages.patch \ + gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \ + gnu/packages/patches/gobject-introspection-cc.patch \ + gnu/packages/patches/gobject-introspection-girepository.patch \ + gnu/packages/patches/grep-timing-sensitive-test.patch \ + gnu/packages/patches/grub-CVE-2015-8370.patch \ + gnu/packages/patches/grub-gets-undeclared.patch \ + gnu/packages/patches/grub-freetype.patch \ + gnu/packages/patches/guile-1.8-cpp-4.5.patch \ + gnu/packages/patches/guile-arm-fixes.patch \ + gnu/packages/patches/guile-default-utf8.patch \ + gnu/packages/patches/guile-linux-syscalls.patch \ + gnu/packages/patches/guile-present-coding.patch \ + gnu/packages/patches/guile-relocatable.patch \ + gnu/packages/patches/guile-rsvg-pkgconfig.patch \ + gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ + gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.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/hydra-automake-1.15.patch \ + gnu/packages/patches/hydra-disable-darcs-test.patch \ + gnu/packages/patches/icecat-avoid-bundled-includes.patch \ + gnu/packages/patches/icecat-re-enable-DHE-cipher-suites.patch \ + gnu/packages/patches/icu4c-CVE-2014-6585.patch \ + gnu/packages/patches/icu4c-CVE-2015-1270.patch \ + gnu/packages/patches/icu4c-CVE-2015-4760.patch \ + gnu/packages/patches/ilmbase-fix-tests.patch \ + gnu/packages/patches/imagemagick-test-segv.patch \ + gnu/packages/patches/irrlicht-mesa-10.patch \ + gnu/packages/patches/jasper-CVE-2007-2721.patch \ + gnu/packages/patches/jasper-CVE-2008-3520.patch \ + gnu/packages/patches/jasper-CVE-2008-3522.patch \ + gnu/packages/patches/jasper-CVE-2011-4516-and-CVE-2011-4517.patch \ + gnu/packages/patches/jasper-CVE-2014-8137.patch \ + gnu/packages/patches/jasper-CVE-2014-8138.patch \ + gnu/packages/patches/jasper-CVE-2014-8157.patch \ + gnu/packages/patches/jasper-CVE-2014-8158.patch \ + gnu/packages/patches/jasper-CVE-2014-9029.patch \ + gnu/packages/patches/jasper-CVE-2016-1577.patch \ + gnu/packages/patches/jasper-CVE-2016-1867.patch \ + gnu/packages/patches/jasper-CVE-2016-2089.patch \ + gnu/packages/patches/jasper-CVE-2016-2116.patch \ + gnu/packages/patches/jbig2dec-ignore-testtest.patch \ + gnu/packages/patches/kmod-module-directory.patch \ + gnu/packages/patches/ldc-disable-tests.patch \ + gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ + gnu/packages/patches/liba52-enable-pic.patch \ + gnu/packages/patches/liba52-link-with-libm.patch \ + gnu/packages/patches/liba52-set-soname.patch \ + gnu/packages/patches/liba52-use-mtune-not-mcpu.patch \ + gnu/packages/patches/libarchive-bsdtar-test.patch \ + gnu/packages/patches/libarchive-CVE-2013-0211.patch \ + gnu/packages/patches/libarchive-fix-lzo-test-case.patch \ + gnu/packages/patches/libarchive-mtree-filename-length-fix.patch \ + gnu/packages/patches/libbonobo-activation-test-race.patch \ + gnu/packages/patches/libcanberra-sound-theme-freedesktop.patch \ + gnu/packages/patches/libcmis-fix-test-onedrive.patch \ + gnu/packages/patches/libdrm-symbol-check.patch \ + gnu/packages/patches/libevent-dns-tests.patch \ + gnu/packages/patches/libextractor-ffmpeg-3.patch \ + gnu/packages/patches/libmtp-devices.patch \ + gnu/packages/patches/liboop-mips64-deplibs-fix.patch \ + gnu/packages/patches/libotr-test-auth-fix.patch \ + gnu/packages/patches/liblxqt-include.patch \ + gnu/packages/patches/libmad-armv7-thumb-pt1.patch \ + gnu/packages/patches/libmad-armv7-thumb-pt2.patch \ + gnu/packages/patches/libmad-frame-length.patch \ + gnu/packages/patches/libmad-mips-newgcc.patch \ + gnu/packages/patches/libssh-0.6.5-CVE-2016-0739.patch \ + gnu/packages/patches/libtheora-config-guess.patch \ + gnu/packages/patches/libtiff-CVE-2015-8665+CVE-2015-8683.patch \ + gnu/packages/patches/libtiff-oob-accesses-in-decode.patch \ + gnu/packages/patches/libtiff-oob-write-in-nextdecode.patch \ + gnu/packages/patches/libtool-skip-tests2.patch \ + gnu/packages/patches/libunwind-CVE-2015-3239.patch \ + gnu/packages/patches/libwmf-CAN-2004-0941.patch \ + gnu/packages/patches/libwmf-CVE-2006-3376.patch \ + gnu/packages/patches/libwmf-CVE-2007-0455.patch \ + gnu/packages/patches/libwmf-CVE-2007-2756.patch \ + gnu/packages/patches/libwmf-CVE-2007-3472.patch \ + gnu/packages/patches/libwmf-CVE-2007-3473.patch \ + gnu/packages/patches/libwmf-CVE-2007-3477.patch \ + gnu/packages/patches/libwmf-CVE-2009-1364.patch \ + gnu/packages/patches/libwmf-CVE-2009-3546.patch \ + gnu/packages/patches/libwmf-CVE-2015-0848+CVE-2015-4588.patch \ + gnu/packages/patches/libwmf-CVE-2015-4695.patch \ + gnu/packages/patches/libwmf-CVE-2015-4696.patch \ + gnu/packages/patches/libxslt-CVE-2015-7995.patch \ + gnu/packages/patches/lirc-localstatedir.patch \ + gnu/packages/patches/libpthread-glibc-preparation.patch \ + gnu/packages/patches/lm-sensors-hwmon-attrs.patch \ + gnu/packages/patches/lua-pkgconfig.patch \ + gnu/packages/patches/lua51-liblua-so.patch \ + gnu/packages/patches/lua52-liblua-so.patch \ + gnu/packages/patches/luajit-no_ldconfig.patch \ + gnu/packages/patches/luajit-symlinks.patch \ + gnu/packages/patches/luit-posix.patch \ + gnu/packages/patches/m4-gets-undeclared.patch \ + gnu/packages/patches/make-impure-dirs.patch \ + gnu/packages/patches/mars-install.patch \ + gnu/packages/patches/mars-sfml-2.3.patch \ + gnu/packages/patches/matplotlib-setupext-tk.patch \ + gnu/packages/patches/maxima-defsystem-mkdir.patch \ + gnu/packages/patches/mcron-install.patch \ + gnu/packages/patches/mdadm-gcc-4.9-fix.patch \ + gnu/packages/patches/mhash-keygen-test-segfault.patch \ + gnu/packages/patches/mit-krb5-CVE-2015-8629.patch \ + gnu/packages/patches/mit-krb5-CVE-2015-8630.patch \ + gnu/packages/patches/mit-krb5-CVE-2015-8631.patch \ + gnu/packages/patches/mit-krb5-init-context-null-spnego.patch \ + gnu/packages/patches/mpc123-initialize-ao.patch \ + gnu/packages/patches/mplayer2-theora-fix.patch \ + gnu/packages/patches/module-init-tools-moduledir.patch \ + gnu/packages/patches/mumps-build-parallelism.patch \ + gnu/packages/patches/mupen64plus-ui-console-notice.patch \ + gnu/packages/patches/mutt-store-references.patch \ + gnu/packages/patches/net-tools-bitrot.patch \ + gnu/packages/patches/ngircd-handle-zombies.patch \ + gnu/packages/patches/ngircd-no-dns-in-tests.patch \ + gnu/packages/patches/ninja-tests.patch \ + gnu/packages/patches/ninja-zero-mtime.patch \ + gnu/packages/patches/nss-pkgconfig.patch \ + gnu/packages/patches/nvi-assume-preserve-path.patch \ + gnu/packages/patches/nvi-dbpagesize-binpower.patch \ + gnu/packages/patches/nvi-db4.patch \ + gnu/packages/patches/ocaml-findlib-make-install.patch \ + gnu/packages/patches/openexr-missing-samples.patch \ + gnu/packages/patches/openimageio-boost-1.60.patch \ + gnu/packages/patches/openjpeg-CVE-2015-6581.patch \ + gnu/packages/patches/openjpeg-use-after-free-fix.patch \ + gnu/packages/patches/openssh-CVE-2015-8325.patch \ + gnu/packages/patches/openssl-runpath.patch \ + gnu/packages/patches/openssl-c-rehash-in.patch \ + gnu/packages/patches/orpheus-cast-errors-and-includes.patch \ + gnu/packages/patches/ots-no-include-missing-file.patch \ + gnu/packages/patches/patchelf-page-size.patch \ + gnu/packages/patches/patchelf-rework-for-arm.patch \ + gnu/packages/patches/patchutils-xfail-gendiff-tests.patch \ + gnu/packages/patches/patch-hurd-path-max.patch \ + gnu/packages/patches/pcre-CVE-2016-3191.patch \ + gnu/packages/patches/perl-CVE-2015-8607.patch \ + gnu/packages/patches/perl-CVE-2016-2381.patch \ + gnu/packages/patches/perl-autosplit-default-time.patch \ + gnu/packages/patches/perl-deterministic-ordering.patch \ + gnu/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \ + gnu/packages/patches/perl-gd-options-passthrough-and-fontconfig.patch \ + gnu/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch \ + gnu/packages/patches/perl-net-amazon-s3-moose-warning.patch \ + gnu/packages/patches/perl-net-ssleay-disable-ede-test.patch \ + gnu/packages/patches/perl-no-build-time.patch \ + gnu/packages/patches/perl-no-sys-dirs.patch \ + gnu/packages/patches/perl-module-pluggable-search.patch \ + gnu/packages/patches/perl-source-date-epoch.patch \ + gnu/packages/patches/pidgin-add-search-path.patch \ + gnu/packages/patches/pinball-const-fix.patch \ + gnu/packages/patches/pinball-cstddef.patch \ + gnu/packages/patches/pinball-missing-separators.patch \ + gnu/packages/patches/pinball-src-deps.patch \ + gnu/packages/patches/pinball-system-ltdl.patch \ + gnu/packages/patches/pingus-sdl-libs-config.patch \ + gnu/packages/patches/plink-1.07-unclobber-i.patch \ + gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ + gnu/packages/patches/polkit-drop-test.patch \ + gnu/packages/patches/portaudio-audacity-compat.patch \ + gnu/packages/patches/procmail-ambiguous-getline-debian.patch \ + gnu/packages/patches/pt-scotch-build-parallelism.patch \ + gnu/packages/patches/pulseaudio-fix-mult-test.patch \ + gnu/packages/patches/pulseaudio-longer-test-timeout.patch \ + gnu/packages/patches/pycairo-wscript.patch \ + gnu/packages/patches/pybugz-encode-error.patch \ + gnu/packages/patches/pybugz-stty.patch \ + gnu/packages/patches/pygpgme-disable-problematic-tests.patch \ + gnu/packages/patches/pyqt-configure.patch \ + gnu/packages/patches/python-2-deterministic-build-info.patch \ + gnu/packages/patches/python-2.7-search-paths.patch \ + gnu/packages/patches/python-2.7-source-date-epoch.patch \ + gnu/packages/patches/python-3-deterministic-build-info.patch \ + gnu/packages/patches/python-3-search-paths.patch \ + gnu/packages/patches/python-disable-ssl-test.patch \ + gnu/packages/patches/python-fix-tests.patch \ + gnu/packages/patches/python-ipython-inputhook-ctype.patch \ + gnu/packages/patches/python-rarfile-fix-tests.patch \ + gnu/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ + gnu/packages/patches/python-configobj-setuptools.patch \ + gnu/packages/patches/python-paste-remove-website-test.patch \ + gnu/packages/patches/python-paste-remove-timing-test.patch \ + gnu/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ + gnu/packages/patches/python-pandas-fix-tslib-test-failure.patch \ + gnu/packages/patches/qemu-CVE-2015-8558.patch \ + gnu/packages/patches/qemu-CVE-2015-8567.patch \ + gnu/packages/patches/qemu-CVE-2015-8613.patch \ + gnu/packages/patches/qemu-CVE-2015-8619.patch \ + gnu/packages/patches/qemu-CVE-2015-8701.patch \ + gnu/packages/patches/qemu-CVE-2015-8743.patch \ + gnu/packages/patches/qemu-CVE-2016-1568.patch \ + gnu/packages/patches/qemu-CVE-2016-1922.patch \ + gnu/packages/patches/qemu-CVE-2016-1981.patch \ + gnu/packages/patches/qemu-CVE-2016-2197.patch \ + gnu/packages/patches/qemu-usb-ehci-oob-read.patch \ + gnu/packages/patches/qemu-virtio-9p-use-accessor-to-get-thread-pool.patch \ + gnu/packages/patches/qt4-ldflags.patch \ + gnu/packages/patches/ratpoison-shell.patch \ + gnu/packages/patches/readline-link-ncurses.patch \ + gnu/packages/patches/ripperx-missing-file.patch \ + gnu/packages/patches/rsem-makefile.patch \ + gnu/packages/patches/sed-hurd-path-max.patch \ + 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 \ + gnu/packages/patches/slurm-configure-remove-nonfree-contribs.patch \ + gnu/packages/patches/soprano-find-clucene.patch \ + gnu/packages/patches/sudo-CVE-2015-5602.patch \ + gnu/packages/patches/superlu-dist-scotchmetis.patch \ + gnu/packages/patches/synfig-build-fix.patch \ + gnu/packages/patches/tar-d_ino_in_dirent-fix.patch \ + gnu/packages/patches/tar-skip-unreliable-tests.patch \ + gnu/packages/patches/tcl-mkindex-deterministic.patch \ + gnu/packages/patches/tclxml-3.2-install.patch \ + gnu/packages/patches/tcsh-fix-autotest.patch \ + gnu/packages/patches/texi2html-document-encoding.patch \ + gnu/packages/patches/texi2html-i18n.patch \ + gnu/packages/patches/tidy-CVE-2015-5522+5523.patch \ + gnu/packages/patches/tinyxml-use-stl.patch \ + gnu/packages/patches/tk-find-library.patch \ + gnu/packages/patches/ttf2eot-cstddef.patch \ + gnu/packages/patches/ttfautohint-source-date-epoch.patch \ + gnu/packages/patches/tophat-build-with-later-seqan.patch \ + gnu/packages/patches/torsocks-dns-test.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 \ + gnu/packages/patches/unzip-CVE-2014-9636.patch \ + gnu/packages/patches/unzip-CVE-2015-7696.patch \ + gnu/packages/patches/unzip-CVE-2015-7697.patch \ + gnu/packages/patches/unzip-allow-greater-hostver-values.patch \ + gnu/packages/patches/unzip-attribs-overflow.patch \ + gnu/packages/patches/unzip-overflow-on-invalid-input.patch \ + gnu/packages/patches/unzip-format-secure.patch \ + gnu/packages/patches/unzip-initialize-symlink-flag.patch \ + gnu/packages/patches/unzip-overflow-long-fsize.patch \ + gnu/packages/patches/unzip-remove-build-date.patch \ + gnu/packages/patches/util-linux-tests.patch \ + gnu/packages/patches/upower-builddir.patch \ + gnu/packages/patches/valgrind-enable-arm.patch \ + gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch \ + gnu/packages/patches/vpnc-script.patch \ + gnu/packages/patches/vtk-mesa-10.patch \ + gnu/packages/patches/w3m-libgc.patch \ + gnu/packages/patches/w3m-force-ssl_verify_server-on.patch \ + gnu/packages/patches/w3m-disable-sslv2-and-sslv3.patch \ + gnu/packages/patches/w3m-disable-weak-ciphers.patch \ + gnu/packages/patches/weechat-python.patch \ + gnu/packages/patches/weex-vacopy.patch \ + gnu/packages/patches/wicd-bitrate-none-fix.patch \ + gnu/packages/patches/wicd-get-selected-profile-fix.patch \ + gnu/packages/patches/wicd-urwid-1.3.patch \ + gnu/packages/patches/wicd-wpa2-ttls.patch \ + gnu/packages/patches/wmctrl-64-fix.patch \ + gnu/packages/patches/woff2-libbrotli.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2015-5310.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2015-5314.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2015-5315.patch \ + gnu/packages/patches/wpa-supplicant-CVE-2015-5316.patch \ + gnu/packages/patches/xdotool-fix-makefile.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 \ + gnu/packages/patches/xf86-video-glint-remove-mibstore.patch \ + gnu/packages/patches/xf86-video-i128-remove-mibstore.patch \ + gnu/packages/patches/xf86-video-intel-compat-api.patch \ + gnu/packages/patches/xf86-video-intel-glibc-2.20.patch \ + gnu/packages/patches/xf86-video-mach64-glibc-2.20.patch \ + gnu/packages/patches/xf86-video-nv-remove-mibstore.patch \ + gnu/packages/patches/xf86-video-openchrome-glibc-2.20.patch \ + gnu/packages/patches/xf86-video-tga-remove-mibstore.patch \ + gnu/packages/patches/xfce4-panel-plugins.patch \ + gnu/packages/patches/xfce4-session-fix-xflock4.patch \ + gnu/packages/patches/xfce4-settings-defaults.patch \ + gnu/packages/patches/xmodmap-asprintf.patch \ + gnu/packages/patches/zathura-plugindir-environment-variable.patch + +MISC_DISTRO_FILES = \ + gnu/packages/ld-wrapper.in + +bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap +bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux +bootstrap_i686_linuxdir = $(bootstrapdir)/i686-linux +bootstrap_armhf_linuxdir = $(bootstrapdir)/armhf-linux +bootstrap_mips64el_linuxdir = $(bootstrapdir)/mips64el-linux + +dist_bootstrap_x86_64_linux_DATA = \ + gnu/packages/bootstrap/x86_64-linux/bash \ + gnu/packages/bootstrap/x86_64-linux/mkdir \ + gnu/packages/bootstrap/x86_64-linux/tar \ + gnu/packages/bootstrap/x86_64-linux/xz + +dist_bootstrap_i686_linux_DATA = \ + gnu/packages/bootstrap/i686-linux/bash \ + gnu/packages/bootstrap/i686-linux/mkdir \ + gnu/packages/bootstrap/i686-linux/tar \ + gnu/packages/bootstrap/i686-linux/xz + +dist_bootstrap_armhf_linux_DATA = \ + gnu/packages/bootstrap/armhf-linux/bash \ + gnu/packages/bootstrap/armhf-linux/mkdir \ + gnu/packages/bootstrap/armhf-linux/tar \ + gnu/packages/bootstrap/armhf-linux/xz + +dist_bootstrap_mips64el_linux_DATA = \ + gnu/packages/bootstrap/mips64el-linux/bash \ + gnu/packages/bootstrap/mips64el-linux/mkdir \ + gnu/packages/bootstrap/mips64el-linux/tar \ + gnu/packages/bootstrap/mips64el-linux/xz + +# Big bootstrap binaries are not included in the tarball. Instead, they +# are downloaded. +nodist_bootstrap_x86_64_linux_DATA = \ + gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz +nodist_bootstrap_i686_linux_DATA = \ + gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz +nodist_bootstrap_armhf_linux_DATA = \ + gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz +nodist_bootstrap_mips64el_linux_DATA = \ + gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz + +# Those files must remain executable, so they remain executable once +# imported into the store. +set-bootstrap-executable-permissions: + chmod +x $(DESTDIR)$(bootstrapdir)/*/{bash,mkdir,tar,xz} + +DISTCLEANFILES = \ + $(nodist_bootstrap_x86_64_linux_DATA) \ + $(nodist_bootstrap_i686_linux_DATA) \ + $(nodist_bootstrap_armhf_linux_DATA) \ + $(nodist_bootstrap_mips64el_linux_DATA) + +# Method to download a file from an external source. +DOWNLOAD_FILE = \ + GUILE_LOAD_COMPILED_PATH="$(top_builddir):$$GUILE_LOAD_COMPILED_PATH" \ + $(GUILE) --no-auto-compile -L "$(top_builddir)" -L "$(top_srcdir)" \ + "$(top_srcdir)/build-aux/download.scm" + +gnu/packages/bootstrap/x86_64-linux/guile-2.0.9.tar.xz: + $(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \ + $(DOWNLOAD_FILE) "$@" \ + "037b103522a2d0d7d69c7ffd8de683dfe5bb4b59c1fafd70b4ffd397fd2f57f0" +gnu/packages/bootstrap/i686-linux/guile-2.0.9.tar.xz: + $(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \ + $(DOWNLOAD_FILE) "$@" \ + "b757cd46bf13ecac83fb8e955fb50096ac2d17bb610ca8eb816f29302a00a846" +gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz: + $(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \ + $(DOWNLOAD_FILE) "$@" \ + "e551d05d4d385d6706ab8d574856a087758294dc90ab4c06e70a157a685e23d6" +gnu/packages/bootstrap/mips64el-linux/guile-2.0.9.tar.xz: + $(AM_V_DL)$(MKDIR_P) `dirname "$@"`; \ + $(DOWNLOAD_FILE) "$@" \ + "994680f0001346864aa2c2cc5110f380ee7518dcd701c614291682b8e948f73b" -- cgit v1.2.3 From e993fb849321b740c43d02c922101287426420fa Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 19 Apr 2016 23:29:08 -0400 Subject: gnu: imlib2: Fix CVE-2016-4024. * gnu/packages/patches/imlib2-CVE-2016-4024.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/image.scm (imlib2): Use it. --- gnu/local.mk | 1 + gnu/packages/image.scm | 3 +- gnu/packages/patches/imlib2-CVE-2016-4024.patch | 52 +++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/imlib2-CVE-2016-4024.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1b54b3a855..74d898c116 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -531,6 +531,7 @@ dist_patch_DATA = \ gnu/packages/patches/icu4c-CVE-2015-4760.patch \ gnu/packages/patches/ilmbase-fix-tests.patch \ gnu/packages/patches/imagemagick-test-segv.patch \ + gnu/packages/patches/imlib2-CVE-2016-4024.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jasper-CVE-2007-2721.patch \ gnu/packages/patches/jasper-CVE-2008-3520.patch \ diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 91d6af6fcc..db64ea0c9b 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -467,7 +467,8 @@ compose, and analyze GIF images.") version ".tar.bz2")) (sha256 (base32 - "0xxhgkd1axlcmf3kp1d7naiygparpg8l3sg3d263rhl2z0gm7aw9")))) + "0xxhgkd1axlcmf3kp1d7naiygparpg8l3sg3d263rhl2z0gm7aw9")) + (patches (search-patches "imlib2-CVE-2016-4024.patch")))) (build-system gnu-build-system) (native-inputs `(("pkgconfig" ,pkg-config))) diff --git a/gnu/packages/patches/imlib2-CVE-2016-4024.patch b/gnu/packages/patches/imlib2-CVE-2016-4024.patch new file mode 100644 index 0000000000..c4f1f21b28 --- /dev/null +++ b/gnu/packages/patches/imlib2-CVE-2016-4024.patch @@ -0,0 +1,52 @@ +Fix CVE-2016-4024 (integer overflow in lib/image.h). + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-4024 + +Upstream source: +https://git.enlightenment.org/legacy/imlib2.git/commit/?id=7eba2e4c8ac0e20838947f10f29d0efe1add8227 + +From 7eba2e4c8ac0e20838947f10f29d0efe1add8227 Mon Sep 17 00:00:00 2001 +From: "Yuriy M. Kaminskiy" +Date: Wed, 6 Apr 2016 03:34:01 +0300 +Subject: Fix integer overflow resulting in insufficient heap allocation + +IMAGE_DIMENSIONS_OK ensures that image width and height are less then +46340, so that maximum number of pixels is ~2**31. + +Unfortunately, there are a lot of code that allocates image data with +something like + + malloc(w * h * sizeof(DATA32)); + +Obviously, on 32-bit machines this results in integer overflow, +insufficient heap allocation, with [massive] out-of-bounds heap +overwrite. +Either X_MAX should be reduced to 32767, or (w)*(h) should be checked to +not exceed ULONG_MAX/sizeof(DATA32). + +Security implications: +*) for 32-bit machines: insufficient heap allocation and heap overwrite +in many image loaders, with escalation potential to remote code +execution; +*) for 64-bit machines: it seems, no impact. +--- + src/lib/image.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lib/image.h b/src/lib/image.h +index e9eb678..5fae6ed 100644 +--- a/src/lib/image.h ++++ b/src/lib/image.h +@@ -188,7 +188,8 @@ void __imlib_SaveImage(ImlibImage * im, const char *file, + + /* The maximum pixmap dimension is 65535. */ + /* However, for now, use 46340 (46340^2 < 2^31) to avoid buffer overflow issues. */ +-#define X_MAX_DIM 46340 ++/* Reduced further to 32767, so that (w * h * sizeof(DATA32)) won't exceed ULONG_MAX */ ++#define X_MAX_DIM 32767 + + #define IMAGE_DIMENSIONS_OK(w, h) \ + ( ((w) > 0) && ((h) > 0) && ((w) < X_MAX_DIM) && ((h) < X_MAX_DIM) ) +-- +cgit v0.12 + -- cgit v1.2.3 From 0118c6ab62ac90136fe877ded67869c104440ffd Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 23 Apr 2016 02:49:15 -0400 Subject: gnu: inkscape: Fix build with glibmm-2.48. * gnu/packages/patches/inkscape-drop-wait-for-targets.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/inkscape.scm (inkscape)[source]: Add patch. --- gnu/local.mk | 1 + gnu/packages/inkscape.scm | 7 ++- .../patches/inkscape-drop-wait-for-targets.patch | 68 ++++++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/inkscape-drop-wait-for-targets.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 74d898c116..c49e2313ab 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -532,6 +532,7 @@ dist_patch_DATA = \ gnu/packages/patches/ilmbase-fix-tests.patch \ gnu/packages/patches/imagemagick-test-segv.patch \ gnu/packages/patches/imlib2-CVE-2016-4024.patch \ + gnu/packages/patches/inkscape-drop-wait-for-targets.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jasper-CVE-2007-2721.patch \ gnu/packages/patches/jasper-CVE-2008-3520.patch \ diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm index b09e84ee08..16f83fc474 100644 --- a/gnu/packages/inkscape.scm +++ b/gnu/packages/inkscape.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington -;;; Copyright © 2014 Mark H Weaver +;;; Copyright © 2014, 2016 Mark H Weaver ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,7 +52,10 @@ version ".tar.gz")) (sha256 (base32 - "086v01jy896dj86bq7plrf6si4p6gh6ga2v5417llgmminycz8rc")))) + "086v01jy896dj86bq7plrf6si4p6gh6ga2v5417llgmminycz8rc")) + (patch-flags '("-p0")) + (patches + (search-patches "inkscape-drop-wait-for-targets.patch")))) (build-system gnu-build-system) (inputs `(("aspell" ,aspell) diff --git a/gnu/packages/patches/inkscape-drop-wait-for-targets.patch b/gnu/packages/patches/inkscape-drop-wait-for-targets.patch new file mode 100644 index 0000000000..3dbe6641e2 --- /dev/null +++ b/gnu/packages/patches/inkscape-drop-wait-for-targets.patch @@ -0,0 +1,68 @@ +Copied from Fedora. + +http://pkgs.fedoraproject.org/cgit/rpms/inkscape.git/plain/inkscape-0.91-drop-wait-for-targets.patch?id=eb5340800b563d6b05aa5f11a2f24f2cc0d8c80e + +=== modified file 'src/ui/clipboard.cpp' +--- src/ui/clipboard.cpp 2016-04-02 15:15:43 +0000 ++++ src/ui/clipboard.cpp 2016-04-07 16:30:32 +0000 +@@ -146,8 +146,6 @@ + void _setClipboardColor(guint32); + void _userWarn(SPDesktop *, char const *); + +- void _inkscape_wait_for_targets(std::list &); +- + // private properites + SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it + Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node +@@ -1302,9 +1300,7 @@ + */ + Glib::ustring ClipboardManagerImpl::_getBestTarget() + { +- // GTKmm's wait_for_targets() is broken, see the comment in _inkscape_wait_for_targets() +- std::list targets; // = _clipboard->wait_for_targets(); +- _inkscape_wait_for_targets(targets); ++ std::list targets = _clipboard->wait_for_targets(); + + // clipboard target debugging snippet + /* +@@ -1456,39 +1452,6 @@ + desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, msg); + } + +- +-// GTKMM's clipboard::wait_for_targets is buggy and might return bogus, see +-// +-// https://bugs.launchpad.net/inkscape/+bug/296778 +-// http://mail.gnome.org/archives/gtk-devel-list/2009-June/msg00062.html +-// +-// for details. Until this has been fixed upstream we will use our own implementation +-// of this method, as copied from /gtkmm-2.16.0/gtk/gtkmm/clipboard.cc. +-void ClipboardManagerImpl::_inkscape_wait_for_targets(std::list &listTargets) +-{ +- //Get a newly-allocated array of atoms: +- GdkAtom* targets = NULL; +- gint n_targets = 0; +- gboolean test = gtk_clipboard_wait_for_targets( gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), &targets, &n_targets ); +- if (!test || (targets == NULL)) { +- return; +- } +- +- //Add the targets to the C++ container: +- for (int i = 0; i < n_targets; i++) +- { +- //Convert the atom to a string: +- gchar* const atom_name = gdk_atom_name(targets[i]); +- +- Glib::ustring target; +- if (atom_name) { +- target = Glib::ScopedPtr(atom_name).get(); //This frees the gchar*. +- } +- +- listTargets.push_back(target); +- } +-} +- + /* ####################################### + ClipboardManager class + ####################################### */ + -- cgit v1.2.3 From 267061ba0bc6df0d61081b97d650d95acec8178a Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 23 Apr 2016 13:12:53 -0400 Subject: Revert "gnu: inkscape: Fix build with glibmm-2.48." This reverts commit 0118c6ab62ac90136fe877ded67869c104440ffd. --- gnu/local.mk | 1 - gnu/packages/inkscape.scm | 7 +-- .../patches/inkscape-drop-wait-for-targets.patch | 68 ---------------------- 3 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 gnu/packages/patches/inkscape-drop-wait-for-targets.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c49e2313ab..74d898c116 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -532,7 +532,6 @@ dist_patch_DATA = \ gnu/packages/patches/ilmbase-fix-tests.patch \ gnu/packages/patches/imagemagick-test-segv.patch \ gnu/packages/patches/imlib2-CVE-2016-4024.patch \ - gnu/packages/patches/inkscape-drop-wait-for-targets.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jasper-CVE-2007-2721.patch \ gnu/packages/patches/jasper-CVE-2008-3520.patch \ diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm index 16f83fc474..b09e84ee08 100644 --- a/gnu/packages/inkscape.scm +++ b/gnu/packages/inkscape.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington -;;; Copyright © 2014, 2016 Mark H Weaver +;;; Copyright © 2014 Mark H Weaver ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,10 +52,7 @@ version ".tar.gz")) (sha256 (base32 - "086v01jy896dj86bq7plrf6si4p6gh6ga2v5417llgmminycz8rc")) - (patch-flags '("-p0")) - (patches - (search-patches "inkscape-drop-wait-for-targets.patch")))) + "086v01jy896dj86bq7plrf6si4p6gh6ga2v5417llgmminycz8rc")))) (build-system gnu-build-system) (inputs `(("aspell" ,aspell) diff --git a/gnu/packages/patches/inkscape-drop-wait-for-targets.patch b/gnu/packages/patches/inkscape-drop-wait-for-targets.patch deleted file mode 100644 index 3dbe6641e2..0000000000 --- a/gnu/packages/patches/inkscape-drop-wait-for-targets.patch +++ /dev/null @@ -1,68 +0,0 @@ -Copied from Fedora. - -http://pkgs.fedoraproject.org/cgit/rpms/inkscape.git/plain/inkscape-0.91-drop-wait-for-targets.patch?id=eb5340800b563d6b05aa5f11a2f24f2cc0d8c80e - -=== modified file 'src/ui/clipboard.cpp' ---- src/ui/clipboard.cpp 2016-04-02 15:15:43 +0000 -+++ src/ui/clipboard.cpp 2016-04-07 16:30:32 +0000 -@@ -146,8 +146,6 @@ - void _setClipboardColor(guint32); - void _userWarn(SPDesktop *, char const *); - -- void _inkscape_wait_for_targets(std::list &); -- - // private properites - SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it - Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node -@@ -1302,9 +1300,7 @@ - */ - Glib::ustring ClipboardManagerImpl::_getBestTarget() - { -- // GTKmm's wait_for_targets() is broken, see the comment in _inkscape_wait_for_targets() -- std::list targets; // = _clipboard->wait_for_targets(); -- _inkscape_wait_for_targets(targets); -+ std::list targets = _clipboard->wait_for_targets(); - - // clipboard target debugging snippet - /* -@@ -1456,39 +1452,6 @@ - desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, msg); - } - -- --// GTKMM's clipboard::wait_for_targets is buggy and might return bogus, see --// --// https://bugs.launchpad.net/inkscape/+bug/296778 --// http://mail.gnome.org/archives/gtk-devel-list/2009-June/msg00062.html --// --// for details. Until this has been fixed upstream we will use our own implementation --// of this method, as copied from /gtkmm-2.16.0/gtk/gtkmm/clipboard.cc. --void ClipboardManagerImpl::_inkscape_wait_for_targets(std::list &listTargets) --{ -- //Get a newly-allocated array of atoms: -- GdkAtom* targets = NULL; -- gint n_targets = 0; -- gboolean test = gtk_clipboard_wait_for_targets( gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), &targets, &n_targets ); -- if (!test || (targets == NULL)) { -- return; -- } -- -- //Add the targets to the C++ container: -- for (int i = 0; i < n_targets; i++) -- { -- //Convert the atom to a string: -- gchar* const atom_name = gdk_atom_name(targets[i]); -- -- Glib::ustring target; -- if (atom_name) { -- target = Glib::ScopedPtr(atom_name).get(); //This frees the gchar*. -- } -- -- listTargets.push_back(target); -- } --} -- - /* ####################################### - ClipboardManager class - ####################################### */ - -- cgit v1.2.3 From e969b140a4382fd91514439a57749379cf00f86b Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 23 Apr 2016 13:13:53 -0400 Subject: Revert "Merge branch 'gnome-updates'" This reverts commit 63655d459e28b09cd8d58743dae14b3460f6c9da, reversing changes made to 80627f51f0238b9450745f4e642172d059ca5bb5. --- gnu/local.mk | 5 +- gnu/packages/fontutils.scm | 29 ++- gnu/packages/glib.scm | 138 +++------- gnu/packages/gnome.scm | 286 +++++++++++---------- gnu/packages/gtk.scm | 80 +++--- gnu/packages/patches/glib-tests-desktop.patch | 138 ++++++++++ gnu/packages/patches/glib-tests-gapplication.patch | 28 ++ gnu/packages/patches/glib-tests-homedir.patch | 59 +++++ gnu/packages/patches/glib-tests-prlimit.patch | 14 + gnu/packages/patches/glib-tests-timer.patch | 11 + gnu/packages/patches/gtk2-theme-paths.patch | 41 --- gnu/packages/pdf.scm | 16 +- gnu/packages/xdisorg.scm | 4 +- 13 files changed, 512 insertions(+), 337 deletions(-) create mode 100644 gnu/packages/patches/glib-tests-desktop.patch create mode 100644 gnu/packages/patches/glib-tests-gapplication.patch create mode 100644 gnu/packages/patches/glib-tests-homedir.patch create mode 100644 gnu/packages/patches/glib-tests-prlimit.patch delete mode 100644 gnu/packages/patches/gtk2-theme-paths.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 74d898c116..3cdf5e45ed 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -489,7 +489,11 @@ dist_patch_DATA = \ gnu/packages/patches/ghostscript-CVE-2015-3228.patch \ gnu/packages/patches/ghostscript-runpath.patch \ gnu/packages/patches/glib-networking-ssl-cert-file.patch \ + gnu/packages/patches/glib-tests-desktop.patch \ + gnu/packages/patches/glib-tests-homedir.patch \ + gnu/packages/patches/glib-tests-prlimit.patch \ gnu/packages/patches/glib-tests-timer.patch \ + gnu/packages/patches/glib-tests-gapplication.patch \ gnu/packages/patches/glibc-CVE-2015-7547.patch \ gnu/packages/patches/glibc-bootstrap-system.patch \ gnu/packages/patches/glibc-hurd-extern-inline.patch \ @@ -517,7 +521,6 @@ dist_patch_DATA = \ gnu/packages/patches/guile-relocatable.patch \ gnu/packages/patches/guile-rsvg-pkgconfig.patch \ gnu/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ - gnu/packages/patches/gtk2-theme-paths.patch \ gnu/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 05adc71212..5f6ff15935 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -46,21 +46,23 @@ (define-public freetype (package (name "freetype") - (version "2.6.3") + (version "2.6") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/freetype/freetype-" version ".tar.bz2")) (sha256 (base32 - "18k3b026762lmyrxfil5xv8qwnvj7hc12gz9bjqzbb12lmx707ip")))) + "0zilx15fwcpa8hmcxpc423jwb8ijw4qpq968kh18akvn4j0znsc4")))) (build-system gnu-build-system) - (native-inputs - `(("pkg-config" ,pkg-config))) - (propagated-inputs - ;; These are all in the Requires.private field of freetype2.pc. - ;; XXX: add harfbuzz. - `(("libpng" ,libpng) - ("zlib" ,zlib))) + (arguments + `(#:phases + ;; This should not be necessary; reported upstream as + ;; https://savannah.nongnu.org/bugs/index.php?44261 + (alist-cons-before + 'configure 'set-paths + (lambda _ + (setenv "CONFIG_SHELL" (which "bash"))) + %standard-phases))) (synopsis "Font rendering library") (description "Freetype is a library that can be used by applications to access the @@ -359,15 +361,16 @@ applications should be.") (define-public graphite2 (package (name "graphite2") - (version "1.3.8") + (version "1.3.6") (source (origin (method url-fetch) - (uri (string-append "https://github.com/silnrsi/graphite/releases/" - "download/" version "/" name "-" version ".tgz")) + (uri (string-append "https://github.com/silnrsi/graphite/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1hlc9j7w7gihy6gvzfa7902pr6yxq1sr1xkp5rwf0p29m2rjagwz")))) + "1frd9mjaqzvh9gs74ngc43igi53vzjzlwr5chbrs6ii1hc4aa23s")))) (build-system cmake-build-system) (native-inputs `(("python" ,python-2) ; because of "import imap" in tests diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 70020520eb..e7e9df8dff 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -35,7 +35,6 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages gtk) #:use-module (gnu packages libffi) - #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -60,7 +59,7 @@ (define dbus (package (name "dbus") - (version "1.10.8") + (version "1.10.0") (source (origin (method url-fetch) (uri (string-append @@ -68,7 +67,7 @@ version ".tar.gz")) (sha256 (base32 - "0560y3hxpgh346w6avcrcz79c8ansmn771y5xpcvvlr6m8mx5wxs")) + "0jwj7wlrhq5y0fwfh8k2d9rgdpfax06lj8698g6iqbwrzd2rgyqx")) (patches (search-patches "dbus-helper-search-path.patch")))) (build-system gnu-build-system) (arguments @@ -130,7 +129,7 @@ shared NFS home directories.") (define glib (package (name "glib") - (version "2.48.0") + (version "2.46.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" @@ -138,14 +137,16 @@ shared NFS home directories.") name "-" version ".tar.xz")) (sha256 (base32 - "0d3w2hblrw7vvpx60l1kbvb830ygn3v8zhwdz65cc5593j9ycjvl")) - (patches (search-patches "glib-tests-timer.patch")))) + "1yzxr1ip3l0m9ydk5nq32piq70c9f17p5f0jyvlsghzbaawh67ss")) + (patches (search-patches "glib-tests-homedir.patch" + "glib-tests-desktop.patch" + "glib-tests-prlimit.patch" + "glib-tests-timer.patch" + "glib-tests-gapplication.patch")))) (build-system gnu-build-system) (outputs '("out" ; everything "bin" ; glib-mkenums, gtester, etc.; depends on Python "doc")) ; 20 MiB of GTK-Doc reference - (propagated-inputs - `(("pcre" ,pcre))) ; in the Requires.private field of glib-2.0.pc (inputs `(("coreutils" ,coreutils) ("libffi" ,libffi) @@ -159,87 +160,29 @@ shared NFS home directories.") ("perl" ,perl) ; needed by GIO tests ("bash" ,bash))) (arguments - '(#:phases - (modify-phases %standard-phases - (add-before 'build 'pre-build - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; For tests/gdatetime.c. - (setenv "TZDIR" - (string-append (assoc-ref inputs "tzdata") - "/share/zoneinfo")) - - ;; Some tests want write access there. - (setenv "HOME" (getcwd)) - (setenv "XDG_CACHE_HOME" (getcwd)) - - (substitute* '("glib/gspawn.c" - "glib/tests/utils.c" - "tests/spawn-test.c") - (("/bin/sh") - (string-append (assoc-ref inputs "bash") "/bin/sh"))))) - (add-before 'check 'disable-failing-tests - (lambda _ - (let ((disable - (lambda (test-file test-paths) - (define pattern+procs - (map (lambda (test-path) - (cons - ;; XXX: only works for single line statements. - (format #f "g_test_add_func.*\"~a\".*" test-path) - (const ""))) - test-paths)) - (substitute test-file pattern+procs))) - (failing-tests - '(("glib/tests/thread.c" - (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64 - ;; as found on hydra.gnu.org, and strace(1) doesn't - ;; recognize it. - "/thread/thread4")) - - ("glib/tests/timer.c" - (;; fails if compiler optimizations are enabled, which they - ;; are by default. - "/timer/stop")) - - ("gio/tests/gapplication.c" - (;; XXX: proven to be unreliable. See: - ;; - ;; - "/gapplication/quit" - - ;; XXX: fails randomly for unknown reason. See: - ;; - "/gapplication/local-actions")) - - ("gio/tests/contenttype.c" - (;; XXX: requires shared-mime-info. - "/contenttype/guess" - "/contenttype/subtype" - "/contenttype/list" - "/contenttype/icon" - "/contenttype/symbolic-icon" - "/contenttype/tree")) - - ("gio/tests/appinfo.c" - (;; XXX: requires update-desktop-database. - "/appinfo/associations")) - - ("gio/tests/desktop-app-info.c" - (;; XXX: requires update-desktop-database. - "/desktop-app-info/delete" - "/desktop-app-info/default" - "/desktop-app-info/fallback" - "/desktop-app-info/lastused" - "/desktop-app-info/search")) - - ("gio/tests/gdbus-peer.c" - (;; Requires /etc/machine-id. - "/gdbus/codegen-peer-to-peer")) - - ("gio/tests/gdbus-unix-addresses.c" - (;; Requires /etc/machine-id. - "/gdbus/x11-autolaunch"))))) - (and-map (lambda (x) (apply disable x)) failing-tests))))) + '(#:phases (alist-cons-before + 'build 'pre-build + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; For tests/gdatetime.c. + (setenv "TZDIR" + (string-append (assoc-ref inputs "tzdata") + "/share/zoneinfo")) + + ;; Some tests want write access there. + (setenv "XDG_CACHE_HOME" (getcwd)) + + (substitute* '("glib/gspawn.c" + "glib/tests/utils.c" + "tests/spawn-test.c") + (("/bin/sh") + (string-append (assoc-ref inputs "bash") "/bin/sh"))) + + ;; Disable a test that requires dbus. + (substitute* "gio/tests/gdbus-serialization.c" + (("g_test_add_func \ +\\(\"/gdbus/message-serialize/double-array\", test_double_array\\);" all) + (string-append "/* " all " */")))) + %standard-phases) ;; Note: `--docdir' and `--htmldir' are not honored, so work around it. #:configure-flags (list (string-append "--with-html-dir=" @@ -275,14 +218,14 @@ dynamic loading, and an object system.") (define gobject-introspection (package (name "gobject-introspection") - (version "1.48.0") + (version "1.46.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" "gobject-introspection/" (version-major+minor version) "/gobject-introspection-" version ".tar.xz")) (sha256 - (base32 "0xsqwxhfqzr79av89mg766kxpb2i41bd0vwspk01xjdzrnn5l9zs")) + (base32 "0cs27r18fga44ypp8icy62fwx6nh70r1bvhi4lzfn4w85cybsn36")) (modules '((guix build utils))) (snippet '(substitute* "tools/g-ir-tool-template.in" @@ -294,6 +237,7 @@ dynamic loading, and an object system.") (build-system gnu-build-system) (inputs `(("bison" ,bison) + ("cairo" ,cairo) ("flex" ,flex) ("glib" ,glib) ("python-2" ,python-2))) @@ -451,7 +395,7 @@ by GDBus included in Glib.") (define libsigc++ (package (name "libsigc++") - (version "2.8.0") + (version "2.6.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/libsigc++/" @@ -459,7 +403,7 @@ by GDBus included in Glib.") name "-" version ".tar.xz")) (sha256 (base32 - "0lcnzzdq6718znfshs1hflpwqq6awbzwdyp4kv5lfaf54z880jbp")))) + "06xyvxaaxh3nbpjg86gcq5zcc2qnpx354wcfrqlhbndkq5kj2vqq")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("m4" ,m4))) @@ -478,7 +422,7 @@ has an ease of use unmatched by other C++ callback libraries.") (define glibmm (package (name "glibmm") - (version "2.48.1") + (version "2.46.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/glibmm/" @@ -486,7 +430,7 @@ has an ease of use unmatched by other C++ callback libraries.") "/glibmm-" version ".tar.xz")) (sha256 (base32 - "1pvw2mrm03p51p03179rb6fk9p42iykkwj1jcdv7jr265xymy8nw")))) + "1kw65mlabwdjw86jybxslncbnnx40hcx4z6xpq9i4ymjvsnm91n7")))) (build-system gnu-build-system) (arguments `(#:phases (alist-cons-before @@ -559,7 +503,7 @@ useful for C++.") (define-public python-pygobject (package (name "python-pygobject") - (version "3.20.0") + (version "3.18.0") (source (origin (method url-fetch) @@ -568,7 +512,7 @@ useful for C++.") "/pygobject-" version ".tar.xz")) (sha256 (base32 - "0ikzh3l7g1gjh8jj8vg6mdvrb25svp63gxcam4m0i404yh0lgari")))) + "1jbd2m39vcjh5h3m33l0317ziq8dxfzi40r6hrfcs4rp5l8s2fqw")))) (build-system gnu-build-system) (native-inputs `(("which" ,which) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 4272493872..0fd1d5bb29 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -188,7 +188,7 @@ commonly used macros.") (define-public gnome-desktop (package (name "gnome-desktop") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) @@ -197,7 +197,7 @@ commonly used macros.") name "-" version ".tar.xz")) (sha256 (base32 - "13dhvax8fy9qkna4dphb7b5fxn3dsk818p3q8b92a7nrrwcgiiqq")))) + "0avpmyhzz5b3pyfpkp8iq5ym5r5w7zs3a396hqkdpdsiym0vrazc")))) (build-system gnu-build-system) (native-inputs `(("gobject-introspection" ,gobject-introspection) @@ -265,7 +265,7 @@ and keep up to date translations of documentation.") (define-public gcr (package (name "gcr") - (version "3.20.0") + (version "3.18.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -273,7 +273,7 @@ and keep up to date translations of documentation.") name "-" version ".tar.xz")) (sha256 (base32 - "0ydk9dzxx6snxza7j5ps8x932hbr3x1b8hhcaqjq4w4admi2qmwh")))) + "006f6xbd3jppkf9avg83mpqdld5d0z6mr0sm81lql52mmyjnvlfl")))) (build-system gnu-build-system) (arguments '(#:tests? #f ;25 of 598 tests fail because /var/lib/dbus/machine-id does @@ -342,7 +342,7 @@ GNOME Desktop.") (define-public gnome-keyring (package (name "gnome-keyring") - (version "3.20.0") + (version "3.18.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -350,7 +350,7 @@ GNOME Desktop.") name "-" version ".tar.xz")) (sha256 (base32 - "16gcwwcg91ipxjmiyi4c4njvnxixmv1i278p0bilc3lafk6ww5xw")))) + "167dq1yvm080g5s38hqjl0xx5cgpkcl1xqy9p5sxmgc92zb0srrz")))) (build-system gnu-build-system) (arguments `(#:tests? #f ;48 of 603 tests fail because /var/lib/dbus/machine-id does @@ -410,7 +410,7 @@ forgotten when the session ends.") (define-public evince (package (name "evince") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -418,7 +418,7 @@ forgotten when the session ends.") name "-" version ".tar.xz")) (sha256 (base32 - "1052lm4i5qq27sgk6ck5xc1cxh0qx4zzhifjhmzjlv38afj5i0yg")))) + "0cccmbvl1b6d2976642iyfr8g3r69zf3mzl2ln6vjvvdbrv26l3v")))) (build-system glib-or-gtk-build-system) (arguments `(#:configure-flags '("--disable-nautilus") @@ -474,7 +474,7 @@ on the GNOME Desktop with a single simple application.") (define-public gsettings-desktop-schemas (package (name "gsettings-desktop-schemas") - (version "3.20.0") + (version "3.18.0") (source (origin (method url-fetch) @@ -483,7 +483,7 @@ on the GNOME Desktop with a single simple application.") name "-" version ".tar.xz")) (sha256 (base32 - "1hfrqqsmqscgbnaikmyq4yq8h72554wdg13algh5bf8a7i9ip92m")))) + "1szc857f46spdhrbnq9ci3kwfqg5vwpikbf0hprq6vd94rr369xs")))) (build-system gnu-build-system) (inputs `(("glib" ,glib))) @@ -599,7 +599,7 @@ update-desktop-database: updates the database containing a cache of MIME types (define-public adwaita-icon-theme (package (inherit gnome-icon-theme) (name "adwaita-icon-theme") - (version "3.20") + (version "3.18.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -607,19 +607,19 @@ update-desktop-database: updates the database containing a cache of MIME types name "-" version ".tar.xz")) (sha256 (base32 - "0ddfwwqx8s63qbqimmbb015lqsab4s0rvy1j81jdsh7k95rqh2ks")))))) + "0n0fqlg55krw8pgn4z2vxnxh65lyvcydqkrr7klqxp8z00kfg72y")))))) (define-public shared-mime-info (package (name "shared-mime-info") - (version "1.6") + (version "1.2") (source (origin (method url-fetch) (uri (string-append "https://freedesktop.org/~hadess/" "shared-mime-info-" version ".tar.xz")) (sha256 (base32 - "0k637g047gci8g69bg4g19akylpfraxm40hd30j3i4v7cidziy5j")))) + "0y5vi0vr6rbhvfzcfg57cfskn362bpvcpca9cy598nmr87i6lld5")))) (build-system gnu-build-system) (arguments ;; The build system appears not to be parallel-safe. @@ -697,7 +697,7 @@ some form of information without getting in the user's way.") (define-public libpeas (package (name "libpeas") - (version "1.18.0") + (version "1.16.0") (source (origin (method url-fetch) @@ -706,7 +706,7 @@ some form of information without getting in the user's way.") name "-" version ".tar.xz")) (sha256 (base32 - "09jy2rwwgp0xx7cnypxl56m7zzxnj3j4v58xqjxjasf3chn88jdz")))) + "0kj5n5hz93xq7qdb2r7n86nibzwqjr88jxaih1fdbxv5rn7014xh")))) (build-system gnu-build-system) (inputs `(("atk" ,atk) @@ -760,7 +760,7 @@ API add-ons to make GTK+ widgets OpenGL-capable.") (define-public glade3 (package (name "glade") - (version "3.20.0") + (version "3.18.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -768,8 +768,8 @@ API add-ons to make GTK+ widgets OpenGL-capable.") name "-" version ".tar.xz")) (sha256 (base32 - "1zhqvhagy0m85p54jfiayfl0v9af7g0lj7glw8sfwh7cbp56vnc2")))) - (build-system glib-or-gtk-build-system) + "0lk4nvd5s8px9i0pbq7bncikgn2lpx7vjh787d3cvzpvwx3cxnzc")))) + (build-system gnu-build-system) (arguments `(#:tests? #f ; needs X, GL, and software rendering #:phases @@ -804,7 +804,7 @@ the GNOME desktop environment.") (define-public libcroco (package (name "libcroco") - (version "0.6.11") + (version "0.6.8") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -812,7 +812,7 @@ the GNOME desktop environment.") name "-" version ".tar.xz")) (sha256 (base32 - "0mm0wldbi40am5qn0nv7psisbg01k42rwzjxl3gv11l5jj554aqk")))) + "0w453f3nnkbkrly7spx5lx5pf6mwynzmd5qhszprq8amij2invpa")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) @@ -834,7 +834,7 @@ XML/CSS rendering engine.") (define-public libgsf (package (name "libgsf") - (version "1.14.36") + (version "1.14.34") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -842,7 +842,7 @@ XML/CSS rendering engine.") name "-" version ".tar.xz")) (sha256 (base32 - "0h19ssxzz0cmznwga2xy55kjibm24mwxqarnpd0w7xy0hrzm1dvi")))) + "0a5m1i5gp4m2z0cn2x1rrdm8wgrr04bzv65l8pgp6jipw13s9zph")))) (build-system gnu-build-system) (native-inputs `(("intltool" ,intltool) @@ -867,7 +867,7 @@ dealing with different structured file formats.") (define-public librsvg (package (name "librsvg") - (version "2.40.15") + (version "2.40.13") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -875,7 +875,7 @@ dealing with different structured file formats.") name "-" version ".tar.xz")) (sha256 (base32 - "1x05vd2llpmskq3prkp7kbpmshmpp9whj4kfl99ybipf4fhw9jnr")))) + "014q7gz6mgfa7pfn0lr13qqv568ad8j1sw9d4vksnpazq0zajvjd")))) (build-system gnu-build-system) (arguments `(#:phases @@ -1339,7 +1339,14 @@ widgets built in the loading process.") name "-" version ".tar.bz2")) (sha256 (base32 - "129ka3nn8gx9dlfry17ib79azxk45wzfv5rgqzw6dwx2b5ns8phm")))) + "129ka3nn8gx9dlfry17ib79azxk45wzfv5rgqzw6dwx2b5ns8phm")) + (modules '((guix build utils))) + (snippet + ;; Adapt to newer freetype. As the package is deprecated, there + ;; is no use in creating a patch and reporting it. + '(substitute* '("libgnomeprint/gnome-font-face.c" + "libgnomeprint/gnome-rfont.c") + (("freetype/") "freetype2/"))))) (build-system gnu-build-system) (inputs `(("popt" ,popt) @@ -1436,14 +1443,14 @@ controls using the Bonobo component framework.") (define-public libwnck (package (name "libwnck") - (version "3.14.1") + (version "3.14.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) (sha256 - (base32 "1ymya8gkjygvg0i901wr3q6ihfqxx5yf4g4pb6fag2iw8af3qr5v")))) + (base32 "074jww04z8g9r1acndqap79wx4kbm3rpkf4lcg1v82b66iv0027m")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -1482,14 +1489,14 @@ Hints specification (EWMH).") (define-public goffice (package (name "goffice") - (version "0.10.28") + (version "0.10.24") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) (sha256 - (base32 "12rsgxrixkfpk420gv026i74pnlgqjzsvm6vffrmih54w46hd3q6")))) + (base32 "0nmghi26dpjcw7knkviq031crhm0zjy4k650pv1jj3hb1fmhx9yd")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;4.1 MiB of gtk-doc @@ -1547,7 +1554,7 @@ Hints specification (EWMH).") (define-public gnumeric (package (name "gnumeric") - (version "1.12.28") + (version "1.12.24") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1555,7 +1562,7 @@ Hints specification (EWMH).") name "-" version ".tar.xz")) (sha256 (base32 - "1fsdp7r6fhc0m3fb4ly4xwh83v3hp2zrv9d0713g4lcy709svm02")))) + "0lcm8k0jb8rd5y4ii803f21nv8rx6gc3mmdlrj5h0rkkn9qm57f5")))) (build-system gnu-build-system) (arguments `(;; The gnumeric developers don't worry much about failing tests. @@ -1584,11 +1591,10 @@ Hints specification (EWMH).") ("libxml2" ,libxml2) ("libxslt" ,libxslt) ("python" ,python-2) - ("python2-pygobject" ,python2-pygobject) + ("python2-pygobject" ,python2-pygobject-2) ("zlib" ,zlib))) (native-inputs - `(("bison" ,bison) - ("intltool" ,intltool) + `(("intltool" ,intltool) ("glib:bin" ,glib "bin") ("pkg-config" ,pkg-config))) (home-page "http://www.gnumeric.org") @@ -1606,7 +1612,7 @@ engineering.") (define-public gnome-themes-standard (package (name "gnome-themes-standard") - (version "3.20") + (version "3.18.0") (source (origin (method url-fetch) @@ -1615,7 +1621,7 @@ engineering.") version ".tar.xz")) (sha256 (base32 - "1p1vvmzfky1ax3yv9ld10xgqwydhmglxpgq3skrfc4539nrq9phw")))) + "1jxss8kxszhf66vic9n1sagczm5amm0mgxpzyxyjna15q82fnip6")))) (build-system gnu-build-system) (inputs `(("gtk+" ,gtk+) @@ -1648,7 +1654,7 @@ engineering.") (define-public seahorse (package (name "seahorse") - (version "3.20.0") + (version "3.18.0") (source (origin (method url-fetch) @@ -1657,7 +1663,7 @@ engineering.") version ".tar.xz")) (sha256 (base32 - "1py6fj19kb8aaxvg6yrpd0876azc2zjvis98aqz37a2lxmhp9c72")))) + "0rxnq47xcagmpqb63g49ay3lfiyjjnmmiay9yifx5jn406d8h32k")))) (build-system glib-or-gtk-build-system) (inputs `(("gtk+" ,gtk+) @@ -1684,7 +1690,7 @@ passwords in the GNOME keyring.") (define-public vala (package (name "vala") - (version "0.32.0") + (version "0.30.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1692,7 +1698,7 @@ passwords in the GNOME keyring.") name "-" version ".tar.xz")) (sha256 (base32 - "0vpvq403vdd25irvgk7zibz3nw4x4i17m0dgnns8j1q4vr7am8h7")))) + "1pyyhfw3zzbhxfscbn8xz70dg6vx0kh8gshzikpxczhg01xk7w31")))) (build-system gnu-build-system) (arguments '(#:phases @@ -1724,7 +1730,7 @@ libraries written in C.") (define-public vte (package (name "vte") - (version "0.44.0") + (version "0.42.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1732,16 +1738,8 @@ libraries written in C.") name "-" version ".tar.xz")) (sha256 (base32 - "1ahjxysiv38q91gfq2wddcbvndlggfr8ynls25m42pw83akv38wk")))) + "1832mrw2hhgjipbsfsv2fmdnwnar4rkx589ciz008bg8x908mscn")))) (build-system gnu-build-system) - (arguments - ;; XXX: fails to compile tests with the default flags. - ;; vteconv.cc:774:40: - ;; error: missing sentinel in function call [-Werror=format=] - ;; g_test_init (&argc, &argv, NULL); - ;; - ;; cc1plus: some warnings being treated as errors - '(#:configure-flags '("CXXFLAGS=-Wformat=0"))) (native-inputs `(("pkg-config" ,pkg-config) ("intltool" ,intltool) @@ -1808,7 +1806,7 @@ editors, IDEs, etc.") (define-public dconf (package (name "dconf") - (version "0.26.0") + (version "0.24.0") (source (origin (method url-fetch) (uri (string-append @@ -1817,7 +1815,7 @@ editors, IDEs, etc.") name "-" version ".tar.xz")) (sha256 (base32 - "1jaqsr1r0grpd25rbsc2v3vb0sc51lia9w31wlqswgqsncp2k0w6")))) + "1hpy6336f0pbkyranywm4872i5in0xn7jf40a66xdmzls77f0ws3")))) (build-system glib-or-gtk-build-system) (inputs `(("gtk+" ,gtk+) @@ -1862,7 +1860,7 @@ configuration storage systems.") (define-public json-glib (package (name "json-glib") - (version "1.2.0") + (version "1.0.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1870,7 +1868,7 @@ configuration storage systems.") name "-" version ".tar.xz")) (sha256 (base32 - "1lx7p1c7cl21byvfgw92n8dhm09vi6qxrs0zkx9dg3y096zdzmlr")) + "1k85vvb2prmk8aa8hmr2rp9rnbhffjgnmr18b13g24xxnqy5kww0")) (modules '((guix build utils))) (snippet ;; Don't duplicate test names. @@ -1969,7 +1967,7 @@ library.") (define-public glib-networking (package (name "glib-networking") - (version "2.48.0") + (version "2.46.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/glib-networking/" @@ -1977,7 +1975,7 @@ library.") name "-" version ".tar.xz")) (sha256 (base32 - "094hwgnaqm0c7ggyqc9rk2603k5r9vqs3f1d9vwpmfapww9367vs")) + "1cchmi08jpjypgmm9i7xzh5qfg2q5k61kry9ns8mhw3z44a440ym")) (patches (search-patches "glib-networking-ssl-cert-file.patch")))) (build-system gnu-build-system) @@ -2051,7 +2049,7 @@ libxml to ease remote use of the RESTful API.") (define-public libsoup (package (name "libsoup") - (version "2.54.0.1") + (version "2.52.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/libsoup/" @@ -2059,7 +2057,7 @@ libxml to ease remote use of the RESTful API.") name "-" version ".tar.xz")) (sha256 (base32 - "1q1qds87qya5cbx4jfcmf1v8fvb86p0wsjnhj246w0xxcq0r5r5d")))) + "0j6cnnpqqgnb9nj2r0j8j6898np4z503hrnpis7b4l5d8yhbq68f")))) (build-system gnu-build-system) (outputs '("out" "doc")) (arguments @@ -2121,7 +2119,7 @@ and the GLib main loop, to integrate well with GNOME applications.") (define-public libsecret (package (name "libsecret") - (version "0.18.5") + (version "0.18.3") (source (origin (method url-fetch) (uri (string-append @@ -2130,7 +2128,7 @@ and the GLib main loop, to integrate well with GNOME applications.") name "-" version ".tar.xz")) (sha256 (base32 - "1cychxc3ff8fp857iikw0n2s13s2mhw2dn1mr632f7w3sn6vvrww")))) + "1jc4pw6pb5igwasj0ms1zx80w63c11myziz3ydj0cr5lb861vgzj")))) (build-system gnu-build-system) (outputs '("out" "doc")) (arguments @@ -2169,7 +2167,7 @@ and other secrets. It communicates with the \"Secret Service\" using DBus.") (define-public gnome-mines (package (name "gnome-mines") - (version "3.20.0") + (version "3.18.2") (source (origin (method url-fetch) @@ -2178,7 +2176,7 @@ and other secrets. It communicates with the \"Secret Service\" using DBus.") name "-" version ".tar.xz")) (sha256 (base32 - "19khp4ckqbdgk6828gprxy52fsg8klf957dnwsin75nskk8whxbp")))) + "0izkcf81rji4dj9k0k93ij4lp5iza2bh6jwlcdhbjfv2xdw0f7ky")))) (build-system glib-or-gtk-build-system) (arguments '(#:phases @@ -2186,7 +2184,16 @@ and other secrets. It communicates with the \"Secret Service\" using DBus.") (add-before 'configure 'patch-/bin/true (lambda _ (substitute* "configure" - (("/bin/true") (which "true")))))))) + (("/bin/true") (which "true"))))) + (add-after 'install 'wrap-pixbuf + ;; Use librsvg's loaders.cache to support SVG files. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (prog (string-append out "/bin/gnome-mines")) + (rsvg (assoc-ref inputs "librsvg")) + (pixbuf (find-files rsvg "^loaders\\.cache$"))) + (wrap-program prog + `("GDK_PIXBUF_MODULE_FILE" = ,pixbuf)))))))) (native-inputs `(("pkg-config" ,pkg-config) ("desktop-file-utils" ,desktop-file-utils) @@ -2241,7 +2248,7 @@ more fun.") (define-public gnome-terminal (package (name "gnome-terminal") - (version "3.20.0") + (version "3.18.2") (source (origin (method url-fetch) @@ -2250,7 +2257,7 @@ more fun.") name "-" version ".tar.xz")) (sha256 (base32 - "0l21xcc2g56wkq83wq5wnrah2gwckqxnfgpqavhkrsd47jyzdrrg")))) + "1ylyv0mla2ypms7iyxndbdjvha0q9jzglb4mhfmqn9cm2gxc0day")))) (build-system glib-or-gtk-build-system) (arguments '(#:configure-flags @@ -2400,7 +2407,7 @@ permission from user.") (define-public geocode-glib (package (name "geocode-glib") - (version "3.20.0") + (version "3.18.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/geocode-glib/" @@ -2408,7 +2415,7 @@ permission from user.") name "-" version ".tar.xz")) (sha256 (base32 - "1fmn3gmifq8jbgnpv8jj33n4glpb5djjrfk0l9fak0cliqin88jz")))) + "0pa9cgndycynipc6z8wzbvn2fi89ndf2gpqzm9m6krp3d7az1dwg")))) (build-system gnu-build-system) (arguments `(;; The tests want to write to $HOME/.cache/geocode-glib, which doesn't @@ -2491,7 +2498,7 @@ service via the system message bus.") (define-public libgweather (package (name "libgweather") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -2499,7 +2506,7 @@ service via the system message bus.") name "-" version ".tar.xz")) (sha256 (base32 - "1mmqg7wf0bhk450akyj0x71x75kh1v7j68isyivr75ydky79nqjj")))) + "1l3sra84k5dnavbdbjyf1ar84xmjszpnnldih6mf45kniwpjkcll")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -2541,7 +2548,7 @@ services for numerous locations.") (define-public gnome-settings-daemon (package (name "gnome-settings-daemon") - (version "3.20.0") + (version "3.18.2") (source (origin (method url-fetch) @@ -2550,7 +2557,7 @@ services for numerous locations.") name "-" version ".tar.xz")) (sha256 (base32 - "0v1c2vnpqw5pvx62jxvjfa2g5k29yx04vz35awqi943gasrl0bmv")))) + "0vzwf875csyqx04fnra6zicmzcjc3s13bxxpcizlys12iwjwfw9h")))) (build-system glib-or-gtk-build-system) (arguments `(;; Network manager not yet packaged. @@ -2597,14 +2604,14 @@ settings, themes, mouse settings, and startup of other daemons.") (define-public totem-pl-parser (package (name "totem-pl-parser") - (version "3.10.6") + (version "3.10.5") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/totem-pl-parser/3.10/" "totem-pl-parser-" version ".tar.xz")) (sha256 (base32 - "0mv7aw9mw77w04zg95zjf0zmk6ckshpysbb9nap15h5is6zdk9cq")))) + "0dw1kiwmjwdjrighri0j9nagsnj44dllm0mamnfh4y5nc47mhim7")))) (build-system gnu-build-system) (arguments ;; FIXME: Tests require gvfs. @@ -2632,7 +2639,7 @@ playlists in a variety of formats.") (define-public aisleriot (package (name "aisleriot") - (version "3.20.1") + (version "3.18.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -2640,7 +2647,7 @@ playlists in a variety of formats.") name "-" version ".tar.xz")) (sha256 (base32 - "1nipky336jj81mhm8wwxp96zilgcrarihf95dnyj3r1pw8kpg7gy")))) + "1qrgcj30hl0fgssspkwrad10lqy1bbsp7lfwxmxlwzp33jhqpb0b")))) (build-system glib-or-gtk-build-system) (arguments '(#:configure-flags @@ -2668,7 +2675,7 @@ which are easy to play with the aid of a mouse.") (define-public devhelp (package (name "devhelp") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -2676,7 +2683,7 @@ which are easy to play with the aid of a mouse.") name "-" version ".tar.xz")) (sha256 (base32 - "078zr92xs5ifp862v1vdmw1j9m6gr9zk5hjbk5065vxjwb17acx2")))) + "1vqsqpc51cir5qf801ibh6ljlpfw0qd513l9hjcnzp4ls8m1cfih")))) (build-system glib-or-gtk-build-system) (native-inputs `(("intltool" ,intltool) @@ -2762,7 +2769,7 @@ without stepping on each others toes.") (define-public clutter (package (name "clutter") - (version "1.26.0") + (version "1.24.2") (source (origin (method url-fetch) @@ -2771,7 +2778,7 @@ without stepping on each others toes.") name "-" version ".tar.xz")) (sha256 (base32 - "01nfjd4k7j2n3agpx2d9ncff86nfsqv4n23465rb9zmk4iw4wlb7")))) + "0qyd0cw17wi8gl6y9z2j2lh2gwghxskfmsdvw4ayrgxwnj6cjccn")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;9 MiB of gtk-doc HTML pages @@ -2815,7 +2822,7 @@ presentations, kiosk style applications and so on.") (define-public clutter-gtk (package (name "clutter-gtk") - (version "1.8.0") + (version "1.6.6") (source (origin (method url-fetch) @@ -2824,7 +2831,7 @@ presentations, kiosk style applications and so on.") name "-" version ".tar.xz")) (sha256 (base32 - "07dzvx0b3fsswxnpxgk0adjgccnrvbxsd971naqwndnfivbgjbkl")))) + "0a2a8ci6in82l43zak3zj3cyms23i5rq6lzk1bz013gm023ach4l")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -2844,7 +2851,7 @@ presentations, kiosk style applications and so on.") (define-public clutter-gst (package (name "clutter-gst") - (version "3.0.18") + (version "3.0.14") (source (origin (method url-fetch) @@ -2853,7 +2860,7 @@ presentations, kiosk style applications and so on.") name "-" version ".tar.xz")) (sha256 (base32 - "14w0pi9myvcn1yxzmk9sk8dghj17m5ji3aqdpfjikk90c060vv0a")))) + "1qidm0q28q6w8gjd0gpqnk8fzqxv39dcp0vlzzawlncp8zfagj7p")))) (build-system gnu-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-mkenums @@ -2875,7 +2882,7 @@ GL based interactive canvas library.") (define-public libchamplain (package (name "libchamplain") - (version "0.12.13") + (version "0.12.12") (source (origin (method url-fetch) (uri (string-append @@ -2883,7 +2890,7 @@ GL based interactive canvas library.") version ".tar.xz")) (sha256 (base32 - "1arzd1hsgq14rbiwa1ih2g250x6ljna2s2kiqfrw155c612s9cxk")))) + "19jlhbgfn9c9g40b3fa2x373s6rfcwx5i9lbpl3vl7d901r7kpp7")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs @@ -2939,7 +2946,7 @@ queries upon that data.") (define-public gnome-klotski (package (name "gnome-klotski") - (version "3.20.0") + (version "3.18.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -2947,7 +2954,7 @@ queries upon that data.") name "-" version ".tar.xz")) (sha256 (base32 - "00hs3ci8swmq12rmgidy7rf3ql9isbklhn114v8rzdfs46y5dzkp")))) + "14l1fji0860yam41x2cy72nd9bljph385ynfm6k1lsv4qhv72az2")))) (build-system glib-or-gtk-build-system) (native-inputs `(("desktop-file-utils" ,desktop-file-utils) @@ -2970,7 +2977,7 @@ as possible!") (define-public grilo (package (name "grilo") - (version "0.2.15") + (version "0.2.14") (source (origin (method url-fetch) @@ -2979,7 +2986,7 @@ as possible!") name "-" version ".tar.xz")) (sha256 (base32 - "05b8sqfmywg45b9frya6xmw5l3c8vf5a1nhy51nyfs0a4n1japbg")))) + "1k8wj8f7xfaw5hxypnmwd34li3fq8h76dacach547rvsfjhjxj3r")))) (build-system gnu-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-mkenums and glib-genmarshal @@ -3021,7 +3028,7 @@ for application developers.") (define-public grilo-plugins (package (name "grilo-plugins") - (version "0.2.17") + (version "0.2.16") (source (origin (method url-fetch) @@ -3030,7 +3037,7 @@ for application developers.") name "-" version ".tar.xz")) (sha256 (base32 - "109pf4sz320jiqs1nzszpj2flkwrgwfsm64kza24mxnxih4njxik")))) + "00sjmkzxc8w4qn4lp5yj65c4y83mwhp0zlvk11ghvpxnklgmgd40")))) (build-system gnu-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-mkenums and glib-genmarshal @@ -3073,7 +3080,7 @@ for application developers.") (define-public totem (package (name "totem") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) @@ -3082,7 +3089,7 @@ for application developers.") name "-" version ".tar.xz")) (sha256 (base32 - "1pq3fg4778qrylkg6lc4jcb3gvm46n5y7mfn26iihi23aj844yq7")))) + "18h784c77m4h359j3xnlwqlfvnhbw7m052ahzm26r106jsp6x0fp")))) (build-system glib-or-gtk-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -3239,7 +3246,7 @@ supports playlists, song ratings, and any codecs installed through gstreamer.") (define-public eog (package (name "eog") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3247,7 +3254,7 @@ supports playlists, song ratings, and any codecs installed through gstreamer.") name "-" version ".tar.xz")) (sha256 (base32 - "0avy7sss6rf659rxipvp3gbqw083liq627lxjpfp1ij34hbmqwfv")))) + "19wkawrcwjjcvlmizkj57qycnbgizhr8ck3j5qg70605d1xb8yvv")))) (build-system glib-or-gtk-build-system) (arguments `(#:phases @@ -3317,7 +3324,7 @@ part of udev-extras, then udev, then systemd. It's now a project on its own.") (define-public gvfs (package (name "gvfs") - (version "1.28.0") + (version "1.26.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3325,7 +3332,7 @@ part of udev-extras, then udev, then systemd. It's now a project on its own.") name "-" version ".tar.xz")) (sha256 (base32 - "017pynx7rfrhgvg904kwxdw9dc26zb0v7ymkspm059qcvw5gqwng")))) + "064dsjrdjcbi38zl38jhh4r9jcpiygg7x4c8s6s2rb757l7nwnv9")))) (build-system gnu-build-system) (arguments '(#:tests? #f)) ; XXX: requiring `pidof' @@ -3469,7 +3476,7 @@ work and the interface is well tested.") (define-public epiphany (package (name "epiphany") - (version "3.20.0") + (version "3.18.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3477,7 +3484,7 @@ work and the interface is well tested.") name "-" version ".tar.xz")) (sha256 (base32 - "0x09dfc0zdxw93g1dcmxqpvy9vnv94bd27sfq23ix31z6i9fcs63")))) + "1hm6bpdcc6nf3zamzkvjhpvxnpaxzbnxnacfgl5v8swn643ifdl4")))) (build-system glib-or-gtk-build-system) (arguments ;; FIXME: tests run under Xvfb, but fail with: @@ -3575,7 +3582,7 @@ of running programs and invoke methods on those interfaces.") (define-public yelp-xsl (package (name "yelp-xsl") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3583,7 +3590,7 @@ of running programs and invoke methods on those interfaces.") name "-" version ".tar.xz")) (sha256 (base32 - "0j288fw7bqbswl2vk73ihs0ngky0b3p8k1yy5lrxfh1whn3phclz")))) + "0qmsq7qkc06gmnkvbs84qj3jjzlihriy3z45nfbpgg51b6z0z1q0")))) (build-system gnu-build-system) (native-inputs `(("intltool" ,intltool) @@ -3599,7 +3606,7 @@ to format Docbook and Mallard documents.") (define-public yelp (package (name "yelp") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3607,7 +3614,7 @@ to format Docbook and Mallard documents.") name "-" version ".tar.xz")) (sha256 (base32 - "0g404njlgr38nif9hb3krybavk56wplkafxvfibcg68iqp9465dz")))) + "10384lr712xdr8zbi07vqh0cf4nd7ybg1vs05r5cy3kwf6s4wfms")))) (build-system glib-or-gtk-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-genmarshal, etc. @@ -3785,7 +3792,7 @@ share them with others via social networking and more.") (define-public file-roller (package (name "file-roller") - (version "3.20.0") + (version "3.16.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3793,7 +3800,7 @@ share them with others via social networking and more.") name "-" version ".tar.xz")) (sha256 (base32 - "1a5598zyzdhdyk7sq59h8hqrjlacxw6wfdmgi0cs5kvbzjr9jnhq")))) + "11a1g8f2700n2mz998wf40dz1rxjgap60mfns9iv0zlw5h5rhmal")))) (build-system glib-or-gtk-build-system) (native-inputs `(("intltool" ,intltool) @@ -3818,7 +3825,7 @@ such as gzip tarballs.") (define-public gnome-session (package (name "gnome-session") - (version "3.20.0") + (version "3.18.1.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3826,7 +3833,7 @@ such as gzip tarballs.") name "-" version ".tar.xz")) (sha256 (base32 - "0d0v60lmvr8wbrswfpc4f4jg2dhxj6nkgv7wnwdf2zifk8vp5zv6")))) + "0icajbzqf5llvp5s8nafwkhwz6a6jmwn4hhs81bk0bpzawyq4zdk")))) (arguments '(#:phases (modify-phases %standard-phases @@ -3942,7 +3949,7 @@ javascript engine and the GObject introspection framework.") (define-public gedit (package (name "gedit") - (version "3.20.1") + (version "3.18.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3950,7 +3957,7 @@ javascript engine and the GObject introspection framework.") name "-" version ".tar.xz")) (sha256 (base32 - "1i0x1jd9x1vpv8lwdlzwf0ml8jxh3b3l6nlg6pbnfjw47w3y6iws")))) + "1rrjdkvwwjyj05jc9icifjm9v8sgs0wqgy555m57a3rvg46sqqk7")))) (build-system glib-or-gtk-build-system) (arguments `(#:phases @@ -3999,7 +4006,7 @@ powerful general purpose text editor.") (define-public zenity (package (name "zenity") - (version "3.20.0") + (version "3.18.1.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4007,7 +4014,7 @@ powerful general purpose text editor.") name "-" version ".tar.xz")) (sha256 (base32 - "0j2sy6imwp41l75hy3fwr68n35drvanbwgmr42kc04zqjy9pbs02")))) + "02m88dfm1rziqk2ywakwib06wl1rxangbzih6cp8wllbyl1plcg6")))) (build-system gnu-build-system) (native-inputs `(("gettext" ,gnu-gettext) @@ -4026,7 +4033,7 @@ to display dialog boxes from the commandline and shell scripts.") (define-public mutter (package (name "mutter") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4034,7 +4041,7 @@ to display dialog boxes from the commandline and shell scripts.") name "-" version ".tar.xz")) (sha256 (base32 - "1x8nhnili1bq3pnrvr3jsgchcz36jzi9infrbr3gplwxnsbx4i2n")))) + "1ab959z5fgi4rq0ifxdqvpdbv99a2b1lfgvj327s9crdvk4ygpjg")))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -4076,7 +4083,7 @@ window manager.") (define-public gnome-online-accounts (package (name "gnome-online-accounts") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4084,7 +4091,7 @@ window manager.") name "-" version ".tar.xz")) (sha256 (base32 - "0q546q65ba537dbxqnvs27x6pvhvi394v43kihgw4pa59j8k70n9")))) + "1hn2fvkr1f4qh4gix03avnvk7pklvv5272ns8ws56v4kcq4nppkc")))) (build-system glib-or-gtk-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. @@ -4114,7 +4121,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.") (define-public evolution-data-server (package (name "evolution-data-server") - (version "3.20.0") + (version "3.18.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4122,7 +4129,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.") name "-" version ".tar.xz")) (sha256 (base32 - "0jsgzahaha6bxrm15da7c32m8ksnmx9rfm7xdx99lbxhsm7yiwh5")))) + "16yfd2a00xqxikyf6pi2awfd0qfq4hwdhfar88axrb4mycfgqhjr")))) (build-system gnu-build-system) (arguments '(;; XXX: fails with: @@ -4175,7 +4182,7 @@ Evolution (hence the name), but is now used by other packages as well.") (define-public caribou (package (name "caribou") - (version "0.4.20") + (version "0.4.19") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4183,7 +4190,7 @@ Evolution (hence the name), but is now used by other packages as well.") name "-" version ".tar.xz")) (sha256 (base32 - "1nahpfs5ap9f9wsvn93kg8isqffk60v785f1q6k64awcd7an8ris")))) + "0i2s2xy9ami3wslam15cajhggpcsj4c70qm7qddcz52z9k0x02rg")))) (build-system glib-or-gtk-build-system) (arguments '(#:phases @@ -4394,7 +4401,7 @@ libxml2.") (define-public gdm (package (name "gdm") - (version "3.20.0") + (version "3.18.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4402,7 +4409,7 @@ libxml2.") name "-" version ".tar.xz")) (sha256 (base32 - "1hnkv4j4m6z9l2y1rzxn674ir34k57apz1ybr15m11ksn05vlky6")))) + "08pqhslwd487nh9w0jp4d0s4s2imm4ds0jjsbl6lzmqifqj3b4jl")))) (build-system gnu-build-system) (arguments '(#:configure-flags @@ -4454,7 +4461,7 @@ providing graphical log-ins and managing local and remote displays.") (define-public libgtop (package (name "libgtop") - (version "2.34.0") + (version "2.32.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4462,7 +4469,7 @@ providing graphical log-ins and managing local and remote displays.") name "-" version ".tar.xz")) (sha256 (base32 - "0apfnh9k6vmbdm8ms5wxyhagrrl8r88fv48k7q5qq70df2gf72ld")))) + "13hpml2vfm23816qggr5fvxj75ndb1dq4rgmi7ik6azj69ij8hw4")))) (build-system gnu-build-system) (native-inputs `(("gobject-introspection" ,gobject-introspection) @@ -4481,7 +4488,7 @@ usage and information about running processes.") (define-public gnome-bluetooth (package (name "gnome-bluetooth") - (version "3.18.3") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4489,7 +4496,7 @@ usage and information about running processes.") name "-" version ".tar.xz")) (sha256 (base32 - "1qwc9q7x22sc71zhqv4db78rqzxl6fqfw6d978ydqap54c2bg0g4")))) + "0jaa9nbygdvcqp9k4p4iy2g8x3684s4x9k5nbcmmm11jdn4mn7f5")))) (build-system glib-or-gtk-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc. @@ -4514,7 +4521,7 @@ devices using the GNOME desktop.") (define-public gnome-control-center (package (name "gnome-control-center") - (version "3.20.0") + (version "3.18.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4522,7 +4529,7 @@ devices using the GNOME desktop.") name "-" version ".tar.xz")) (sha256 (base32 - "10yncjq5hmaqbr8kjf8s729kn11as705vfx32nxahi7229v31rxp")))) + "1bgqg1sl3cp2azrwrjgwx3jzk9n3w76xpcyvk257qavx4ibn3zin")))) (build-system glib-or-gtk-build-system) (arguments '(#:phases @@ -4584,7 +4591,7 @@ properties, screen resolution, and other GNOME parameters.") (define-public gnome-shell (package (name "gnome-shell") - (version "3.20.0") + (version "3.18.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4592,7 +4599,7 @@ properties, screen resolution, and other GNOME parameters.") name "-" version ".tar.xz")) (sha256 (base32 - "125qjrbw40r8rpri9y0yrl5yqs2q4x0l5inzi3vwl0rxvmhz8sgf")))) + "16sicxdp08yfaj4hiyzvbspb5jk3fpmi291272zhx5vgc3wbl5w5")))) (build-system glib-or-gtk-build-system) (arguments '(#:phases @@ -4704,7 +4711,7 @@ as SASL, TLS and VeNCrypt. Additionally it supports encoding extensions.") (define-public nautilus (package (name "nautilus") - (version "3.20.0") + (version "3.18.2") ; XXX: later version require gtk+-3.0 >= 3.18.5 (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4712,11 +4719,10 @@ as SASL, TLS and VeNCrypt. Additionally it supports encoding extensions.") name "-" version ".tar.xz")) (sha256 (base32 - "14s234b4l7hsxng1n3kkj4c8sjsq2vl2l2fw0caqfxva9md9k9vw")))) + "0jj23n8vmmyc4gp5xhiz7slsxwksydp26blxi5m154yaw9lgdp38")))) (build-system glib-or-gtk-build-system) (arguments - '(#:configure-flags - '("--disable-tracker" "--disable-selinux") ; XXX: not packaged + '(#:configure-flags '("--disable-tracker") ; XXX: not packaged ;; XXX: FAIL: check-nautilus ;; Settings schema 'org.gnome.nautilus.preferences' is not installed #:tests? #f)) @@ -4749,7 +4755,7 @@ files.") (define-public baobab (package (name "baobab") - (version "3.20.0") + (version "3.18.1") (source (origin (method url-fetch) (uri (string-append @@ -4758,7 +4764,7 @@ files.") name "-" version ".tar.xz")) (sha256 (base32 - "01vxc9z87i2dsvydm6p1sh4m7bpbggy70q9bx6pxz707hyr6bpaw")))) + "1da4bdkw5bnxansl1xr4lb03d6f4h0a0qaba8i3p3rwhcd191b62")))) (build-system glib-or-gtk-build-system) (native-inputs `(("intltool" ,intltool) @@ -4781,7 +4787,7 @@ is complete it provides a graphical representation of each selected folder.") (define-public gnome-backgrounds (package (name "gnome-backgrounds") - (version "3.20") + (version "3.18.0") (source (origin (method url-fetch) @@ -4790,7 +4796,7 @@ is complete it provides a graphical representation of each selected folder.") name "-" version ".tar.xz")) (sha256 (base32 - "09viag7q53lfwrp074a1w7j0r8izlwpi10xbwjgbf5jwbqb6wv6n")))) + "1fd7y8dh3iy88ayb8irgsihvssli6bzjzb5a6vfhi8qjbw70ymma")))) (build-system glib-or-gtk-build-system) (native-inputs `(("intltool" ,intltool))) @@ -4840,7 +4846,7 @@ beautifying border effects.") (define-public dconf-editor (package (name "dconf-editor") - (version "3.20.0") + (version "3.18.2") (source (origin (method url-fetch) @@ -4849,7 +4855,7 @@ beautifying border effects.") name "-" version ".tar.xz")) (sha256 (base32 - "0q57wmlab01rmwbwlih5mh9fa1nwc2abfz0vl374lkljw9acim13")))) + "0xdwi7g1xdmgrc9m8ii62fp2zj114gsfpmgazlnhrcmmfi97z5d7")))) (build-system glib-or-gtk-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, gio-2.0. diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index f31a510504..255d885b27 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -63,7 +63,7 @@ (define-public atk (package (name "atk") - (version "2.20.0") + (version "2.18.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -71,7 +71,7 @@ name "-" version ".tar.xz")) (sha256 (base32 - "1w1q29yfxcq67j7fyqrfm0l0n1vy4zn539c0sf4ga9d0qkv50fj9")))) + "0ay9s137x49f0akx658p7kznz0rdapfrd8ym54q0hlgrggblhv6f")))) (build-system gnu-build-system) (outputs '("out" "doc")) (arguments @@ -95,14 +95,14 @@ tools have full access to view and control running applications.") (define-public cairo (package (name "cairo") - (version "1.14.6") + (version "1.14.2") (source (origin (method url-fetch) (uri (string-append "http://cairographics.org/releases/cairo-" version ".tar.xz")) (sha256 (base32 - "0lmjlzmghmr27y615px9hkm552x7ap6pmq9mfbzr6smp8y2b6g31")))) + "1sycbq0agbwmg1bj9lhkgsf0glmblaf2jrdy9g6vxfxivncxj6f9")))) (build-system gnu-build-system) (propagated-inputs `(("fontconfig" ,fontconfig) @@ -147,7 +147,7 @@ affine transformation (scale, rotation, shear, etc.).") (define-public harfbuzz (package (name "harfbuzz") - (version "1.2.4") + (version "1.0.6") (source (origin (method url-fetch) (uri (string-append "https://www.freedesktop.org/software/" @@ -155,7 +155,7 @@ affine transformation (scale, rotation, shear, etc.).") version ".tar.bz2")) (sha256 (base32 - "14g4kpph8hgplkm954daxiymxx0vicfq7b7svvdsx54g5bqvv7a4")))) + "09ivk5m4y09ar4zi9r6db7gp234cy05h0ach7w22g9kqvkxsf5pn")))) (build-system gnu-build-system) (outputs '("out" "bin")) ; 160K, only hb-view depend on cairo @@ -185,7 +185,7 @@ affine transformation (scale, rotation, shear, etc.).") (define-public pango (package (name "pango") - (version "1.40.0") + (version "1.38.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/pango/" @@ -193,7 +193,7 @@ affine transformation (scale, rotation, shear, etc.).") name "-" version ".tar.xz")) (sha256 (base32 - "12qwa748wyady16xxdq5rqz9gki1kksj8m5bcv80gjqlydfrh5ys")))) + "1dsf45m51i4rcyvh5wlxxrjfhvn5b67d5ckjc6vdcxbddjgmc80k")))) (build-system gnu-build-system) (propagated-inputs `(("cairo" ,cairo) @@ -339,7 +339,7 @@ printing and other features typical of a source code editor.") (define-public gtksourceview (package (name "gtksourceview") - (version "3.20.1") + (version "3.18.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -347,7 +347,7 @@ printing and other features typical of a source code editor.") name "-" version ".tar.xz")) (sha256 (base32 - "0k4cmq94181l39di9z4agampg4za6bvimkvcjm3qlxmsxb09ab9j")))) + "1cmplnqbyd1js5bkpi9cfc3gljilyxg5nngwh4i3mq9r02gmmxv0")))) (build-system gnu-build-system) (arguments '(#:phases @@ -387,7 +387,7 @@ highlighting and other features typical of a source code editor.") (define-public gdk-pixbuf (package (name "gdk-pixbuf") - (version "2.34.0") + (version "2.32.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -395,7 +395,7 @@ highlighting and other features typical of a source code editor.") name "-" version ".tar.xz")) (sha256 (base32 - "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm")))) + "0cfh87aqyqbfcwpbv1ihgmgfcn66il5q2n8yjyl8gxkjmkqp2rrb")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--with-x11") @@ -415,12 +415,9 @@ highlighting and other features typical of a source code editor.") ;; (gdk-pixbuf-error-quark, 0) (("pixbuf-jpeg\\$\\(EXEEXT\\) ") "")) #t))))) - (propagated-inputs - `(;; Required by gdk-pixbuf-2.0.pc - ("glib" ,glib) - ("libpng" ,libpng) - ;; Used for testing and required at runtime. - ("shared-mime-info" ,shared-mime-info))) + (propagated-inputs ; required by gdk-pixbuf-2.0.pc + `(("glib" ,glib) + ("libpng" ,libpng))) (inputs `(("libjpeg" ,libjpeg) ("libtiff" ,libtiff) @@ -468,7 +465,7 @@ in the GNOME project.") (define-public at-spi2-core (package (name "at-spi2-core") - (version "2.20.0") + (version "2.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -476,7 +473,7 @@ in the GNOME project.") name "-" version ".tar.xz")) (sha256 (base32 - "16v09iwnd3895fshsvsci836dar21c8y9w8zn882jn4fq2vrzi6w")))) + "1kq17w4fm51d49vzmglkxqdm6s0yvjvrpgw78r2hajf69jz5bmap")))) (build-system gnu-build-system) (outputs '("out" "doc")) (arguments @@ -513,7 +510,7 @@ is part of the GNOME accessibility project.") (define-public at-spi2-atk (package (name "at-spi2-atk") - (version "2.20.0") + (version "2.18.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -521,7 +518,7 @@ is part of the GNOME accessibility project.") name "-" version ".tar.xz")) (sha256 (base32 - "1lis9zj4r3d5ff3chs0r93gjkbp0wgflfx35gbax47cgdqmi8jx2")))) + "0bf1g5cj84rmx7p1q547vwbc0hlpcs2wrxnmv96lckfkhs9mzcf4")))) (build-system gnu-build-system) (arguments '(#:phases @@ -548,7 +545,7 @@ is part of the GNOME accessibility project.") (define-public gtk+-2 (package (name "gtk+") - (version "2.24.30") + (version "2.24.28") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -556,14 +553,13 @@ is part of the GNOME accessibility project.") name "-" version ".tar.xz")) (sha256 (base32 - "0l6aqk86aw5w132ygy6hv6nlxvd1h6xg7c85qbm60p6mnv1ww58d")) - (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch" - "gtk2-theme-paths.patch")))) + "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj")) + (patches (search-patches "gtk2-respect-GUIX_GTK2_PATH.patch")))) (build-system gnu-build-system) (outputs '("out" "doc")) (propagated-inputs `(("atk" ,atk) - ("gdk-pixbuf" ,gdk-pixbuf+svg) + ("gdk-pixbuf" ,gdk-pixbuf) ("pango" ,pango))) (inputs `(("cups" ,cups) @@ -610,7 +606,7 @@ application suites.") (define-public gtk+ (package (inherit gtk+-2) (name "gtk+") - (version "3.20.2") + (version "3.18.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -618,12 +614,12 @@ application suites.") name "-" version ".tar.xz")) (sha256 (base32 - "1xv97zrngf47hyrxz7rfrdl5xpv4y61rkmipyi300pm5iq3d3c8s")) + "0lp1hn0qydxx03bianzzr0a4maqzsvylrkzr7c3p0050qihwbgjx")) (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch")))) (propagated-inputs `(("at-spi2-atk" ,at-spi2-atk) ("atk" ,atk) - ("gdk-pixbuf" ,gdk-pixbuf+svg) + ("gdk-pixbuf" ,gdk-pixbuf) ("libepoxy" ,libepoxy) ("libxcursor" ,libxcursor) ("libxi" ,libxi) @@ -631,7 +627,8 @@ application suites.") ("libxdamage" ,libxdamage) ("pango" ,pango))) (inputs - `(("libxml2" ,libxml2) + `(("librsvg" ,librsvg) ;for gtk-encode-symbolic-svg + ("libxml2" ,libxml2) ;; XXX: colord depends on mozjs (through polkit), which fails on ;; on non-intel systems now. ;;("colord" ,colord) @@ -666,7 +663,18 @@ application suites.") (("SUBDIRS = gdk gtk a11y css reftests") "SUBDIRS = gdk")) #t) - %standard-phases))) + (alist-cons-after + 'install 'wrap-gtk-encode-symbolic-svg + ;; By using GdkPixbuf, gtk-encode-symbolic-svg needs to know + ;; librsvg's loaders.cache to handle SVG files. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (prog (string-append out "/bin/gtk-encode-symbolic-svg")) + (librsvg (assoc-ref inputs "librsvg")) + (loaders.cache (find-files librsvg "^loaders\\.cache$"))) + (wrap-program prog + `("GDK_PIXBUF_MODULE_FILE" = ,loaders.cache)))) + %standard-phases)))) (native-search-paths (list (search-path-specification (variable "GUIX_GTK3_PATH") @@ -856,7 +864,7 @@ library.") (define-public pangomm (package (name "pangomm") - (version "2.40.0") + (version "2.38.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -864,7 +872,7 @@ library.") name "-" version ".tar.xz")) (sha256 (base32 - "03fpqdjp7plybf4zsgszbm8yhgl28vmajzfpmaqcsmyfvjlszl3x")))) + "12xwjvqfxhqblcv7641k0l6r8n3qifnrx8w9571izn1nbd81iyzg")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs @@ -905,7 +913,7 @@ toolkit.") (define-public gtkmm (package (name "gtkmm") - (version "3.20.0") + (version "3.18.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -913,7 +921,7 @@ toolkit.") name "-" version ".tar.xz")) (sha256 (base32 - "12h2kd22iayvjfhmgjccm33igrbvqdj7hym31fsa1y0dhwzmf8gh")))) + "0sxq700invkjpksn790gbnl8px8751kvgwn39663jx7dv89s37w2")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("glib" ,glib "bin"))) ;for 'glib-compile-resources' diff --git a/gnu/packages/patches/glib-tests-desktop.patch b/gnu/packages/patches/glib-tests-desktop.patch new file mode 100644 index 0000000000..642234ebbc --- /dev/null +++ b/gnu/packages/patches/glib-tests-desktop.patch @@ -0,0 +1,138 @@ +Some GLib tests expect desktop things, such as an xterm, a MIME +database, the `update-desktop-database' program, which we don't provide. + +--- glib-2.37.1/gio/tests/appinfo.c 2013-06-07 23:44:44.000000000 +0200 ++++ glib-2.37.1/gio/tests/appinfo.c 2013-06-07 23:44:56.000000000 +0200 +@@ -497,16 +497,10 @@ main (int argc, char *argv[]) + + g_test_add_func ("/appinfo/basic", test_basic); + g_test_add_func ("/appinfo/text", test_text); +- g_test_add_func ("/appinfo/launch", test_launch); + g_test_add_func ("/appinfo/show-in", test_show_in); + g_test_add_func ("/appinfo/commandline", test_commandline); +- g_test_add_func ("/appinfo/launch-context", test_launch_context); +- g_test_add_func ("/appinfo/launch-context-signals", test_launch_context_signals); + g_test_add_func ("/appinfo/tryexec", test_tryexec); +- g_test_add_func ("/appinfo/associations", test_associations); + g_test_add_func ("/appinfo/environment", test_environment); +- g_test_add_func ("/appinfo/startup-wm-class", test_startup_wm_class); +- g_test_add_func ("/appinfo/supported-types", test_supported_types); + g_test_add_func ("/appinfo/from-keyfile", test_from_keyfile); + + return g_test_run (); + +--- glib-2.40.0/gio/tests/contenttype.c 2013-01-16 21:22:29.000000000 +0100 ++++ glib-2.40.0/gio/tests/contenttype.c 2013-01-16 21:22:33.000000000 +0100 +@@ -207,15 +207,6 @@ main (int argc, char *argv[]) + { + g_test_init (&argc, &argv, NULL); + +- g_test_add_func ("/contenttype/guess", test_guess); +- g_test_add_func ("/contenttype/unknown", test_unknown); +- g_test_add_func ("/contenttype/subtype", test_subtype); +- g_test_add_func ("/contenttype/list", test_list); +- g_test_add_func ("/contenttype/executable", test_executable); +- g_test_add_func ("/contenttype/description", test_description); +- g_test_add_func ("/contenttype/icon", test_icon); +- g_test_add_func ("/contenttype/symbolic-icon", test_symbolic_icon); +- g_test_add_func ("/contenttype/tree", test_tree); + + return g_test_run (); + } + + +--- glib-2.40.0/gio/tests/desktop-app-info.c 2014-03-19 22:50:45.000000000 -0500 ++++ glib-2.40.0/gio/tests/desktop-app-info.c 2014-06-30 14:27:52.543358331 -0500 +@@ -708,6 +708,8 @@ + g_setenv ("XDG_DATA_HOME", basedir, TRUE); + cleanup_subdirs (basedir); + ++ result = g_test_run (); ++ return result; + g_test_add_func ("/desktop-app-info/delete", test_delete); + g_test_add_func ("/desktop-app-info/default", test_default); + g_test_add_func ("/desktop-app-info/fallback", test_fallback); + + +----------------------------- +The hunk below removes tests that depend on `gdbus-testserver.py', +because that script depends on python-gobject. The second hunk +disables a test that expects /etc/machine-id in the build environment. + +--- glib-2.46.0/gio/tests/Makefile.in 2015-10-14 14:11:00.928809504 +0200 ++++ glib-2.46.0/gio/tests/Makefile.in 2015-10-14 14:12:13.157291092 +0200 +@@ -186,20 +186,13 @@ check_PROGRAMS = $(am__EXEEXT_16) + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-auth \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-bz627724 \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-close-pending \ +-@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-connection \ +-@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-connection-loss \ +-@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-connection-slow \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-error \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-exit-on-close \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-export \ +-@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-introspection \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-names \ +-@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-proxy \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-proxy-threads \ +-@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-proxy-well-known-name \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-test-codegen \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-test-codegen-old \ +-@HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gdbus-threading \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gmenumodel \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ gnotification \ + @HAVE_DBUS_DAEMON_TRUE@@OS_UNIX_TRUE@ $(NULL) +@@ -321,8 +314,7 @@ libresourceplugin_la_LINK = $(LIBTOOL) $ + am__EXEEXT_1 = + @OS_UNIX_TRUE@am__EXEEXT_2 = contenttype$(EXEEXT) file$(EXEEXT) \ + @OS_UNIX_TRUE@ gdbus-peer-object-manager$(EXEEXT) \ +-@OS_UNIX_TRUE@ gdbus-unix-addresses$(EXEEXT) \ + @OS_UNIX_TRUE@ live-g-file$(EXEEXT) socket-address$(EXEEXT) \ + @OS_UNIX_TRUE@ stream-rw_all$(EXEEXT) unix-fd$(EXEEXT) \ + @OS_UNIX_TRUE@ unix-streams$(EXEEXT) $(am__EXEEXT_1) \ + + +The test below depends on the availability /etc/passwd to dbus-daemon. + +--- glib-2.40.0/gio/tests/gdbus-auth.c 2014-02-03 11:40:41.000000000 -0600 ++++ glib-2.40.0/gio/tests/gdbus-auth.c 2014-06-30 15:08:43.719421893 -0500 +@@ -286,6 +286,8 @@ + { + gint ret; + ++ g_test_init (&argc, &argv, NULL); ++ return g_test_run(); + setlocale (LC_ALL, "C"); + + temp_dbus_keyrings_setup (); + + +The test dbus-appinfo is dropped as it hangs indefinitely since 2.37.5, see + https://launchpad.net/ubuntu/+source/glib2.0/2.37.5-1ubuntu1 + +--- glib-2.40.0/gio/tests/dbus-appinfo.c 2014-02-03 11:40:41.000000000 -0600 ++++ glib-2.40.0/gio/tests/dbus-appinfo.c 2014-06-30 14:44:08.215383632 -0500 +@@ -278,7 +278,7 @@ + { + g_test_init (&argc, &argv, NULL); + +- g_test_add_func ("/appinfo/dbusappinfo", test_dbus_appinfo); ++ return g_test_run(); + + return session_bus_run (); + } + + +The test below fails for unknown reasons (!). + +--- glib-2.39.1/gio/tests/gsettings.c.orig 2014-01-20 00:45:04.000000000 +0100 ++++ glib-2.39.1/gio/tests/gsettings.c 2014-01-20 00:45:10.000000000 +0100 +@@ -2489,7 +2489,6 @@ main (int argc, char *argv[]) + g_test_add_func ("/gsettings/range/subprocess/high", test_range_high); + g_test_add_func ("/gsettings/range/subprocess/low", test_range_low); + g_test_add_func ("/gsettings/list-items", test_list_items); +- g_test_add_func ("/gsettings/list-schemas", test_list_schemas); + g_test_add_func ("/gsettings/mapped", test_get_mapped); + g_test_add_func ("/gsettings/get-range", test_get_range); + g_test_add_func ("/gsettings/schema-source", test_schema_source); + diff --git a/gnu/packages/patches/glib-tests-gapplication.patch b/gnu/packages/patches/glib-tests-gapplication.patch new file mode 100644 index 0000000000..1845fcb9b8 --- /dev/null +++ b/gnu/packages/patches/glib-tests-gapplication.patch @@ -0,0 +1,28 @@ +This test has proven to be unreliable, often leading to things like this +in gapplication.log: + + PASS: gapplication 3 /gapplication/properties + Failed to register: The connection is closed + ** + GLib-GIO:ERROR:gapplication.c:564:test_quit: assertion failed: (activated) + ok 4 /gapplication/app-id + PASS: gapplication 4 /gapplication/app-id + ../../tap-test: line 5: 24133 Aborted $1 -k --tap + # GLib-GIO:ERROR:gapplication.c:564:test_quit: assertion failed: (activated) + cleaning up pid 24154 + ERROR: gapplication - missing test plan + ERROR: gapplication - exited with status 134 (terminated by signal 6?) + +See and . + + +--- glib-2.40.2/gio/tests/gapplication.c 2014-12-03 22:34:44.566667649 +0100 ++++ glib-2.40.2/gio/tests/gapplication.c 2014-12-03 22:34:45.346674179 +0100 +@@ -685,7 +685,6 @@ main (int argc, char **argv) + /* g_test_add_func ("/gapplication/non-unique", test_nonunique); */ + g_test_add_func ("/gapplication/properties", properties); + g_test_add_func ("/gapplication/app-id", appid); +- g_test_add_func ("/gapplication/quit", test_quit); + g_test_add_func ("/gapplication/local-actions", test_local_actions); + /* g_test_add_func ("/gapplication/remote-actions", test_remote_actions); */ + g_test_add_func ("/gapplication/local-command-line", test_local_command_line); diff --git a/gnu/packages/patches/glib-tests-homedir.patch b/gnu/packages/patches/glib-tests-homedir.patch new file mode 100644 index 0000000000..0a2bcf1a23 --- /dev/null +++ b/gnu/packages/patches/glib-tests-homedir.patch @@ -0,0 +1,59 @@ +`g_get_home_dir' looks at /etc/passwd first, which fails in chroot builds. +The gdbus tests use it to lookup .dbus-keyrings, so they cannot run in our +chroot build environment. Thus, disable them. + +--- glib-2.34.3/gio/tests/gdbus-connection-flush.c 2013-01-16 17:29:46.000000000 +0100 ++++ glib-2.34.3/gio/tests/gdbus-connection-flush.c 2013-01-16 17:29:47.000000000 +0100 +@@ -373,10 +373,6 @@ main (int argc, + g_type_init (); + g_test_init (&argc, &argv, NULL); + +- g_test_add ("/gdbus/connection/flush/busy", Fixture, NULL, +- setup, test_flush_busy, teardown); +- g_test_add ("/gdbus/connection/flush/idle", Fixture, NULL, +- setup, test_flush_idle, teardown); + + ret = g_test_run(); + +--- glib-2.38.0.orig/gio/tests/gdbus-peer.c 2013-08-08 12:00:40.000000000 +0200 ++++ glib-2.38.0/gio/tests/gdbus-peer.c 2013-09-30 19:36:40.000000000 +0200 +@@ -1746,11 +1746,6 @@ + + g_test_add_func ("/gdbus/peer-to-peer", test_peer); + g_test_add_func ("/gdbus/delayed-message-processing", delayed_message_processing); +- g_test_add_func ("/gdbus/nonce-tcp", test_nonce_tcp); +- +- g_test_add_func ("/gdbus/tcp-anonymous", test_tcp_anonymous); +- g_test_add_func ("/gdbus/credentials", test_credentials); +- g_test_add_func ("/gdbus/codegen-peer-to-peer", codegen_test_peer); + + ret = g_test_run(); + +--- glib-2.37.1/gio/tests/gdbus-exit-on-close.c 2013-06-07 23:41:34.000000000 +0200 ++++ glib-2.37.1/gio/tests/gdbus-exit-on-close.c 2013-06-07 23:41:40.000000000 +0200 +@@ -211,6 +211,7 @@ main (int argc, + + g_test_init (&argc, &argv, NULL); + ++ return g_test_run(); + for (i = 0; cases[i].name != NULL; i++) + { + gchar *name; +@@ -224,5 +225,4 @@ main (int argc, + g_free (name); + } + +- return g_test_run(); + } + +--- glib-2.34.3/gio/tests/gdbus-non-socket.c 2013-01-16 18:13:25.000000000 +0100 ++++ glib-2.34.3/gio/tests/gdbus-non-socket.c 2013-01-16 18:13:27.000000000 +0100 +@@ -294,7 +294,6 @@ main (int argc, + g_type_init (); + g_test_init (&argc, &argv, NULL); + +- g_test_add_func ("/gdbus/non-socket", test_non_socket); + + ret = g_test_run(); + + diff --git a/gnu/packages/patches/glib-tests-prlimit.patch b/gnu/packages/patches/glib-tests-prlimit.patch new file mode 100644 index 0000000000..f2b2a61bee --- /dev/null +++ b/gnu/packages/patches/glib-tests-prlimit.patch @@ -0,0 +1,14 @@ +prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64 as found on +hydra.gnu.org, and strace(1) doesn't recognize it. + +--- glib-2.34.3/glib/tests/thread.c 2012-11-20 15:27:12.000000000 +0100 ++++ glib-2.34.3/glib/tests/thread.c 2013-03-27 14:48:31.000000000 +0100 +@@ -130,7 +130,7 @@ test_thread3 (void) + static void + test_thread4 (void) + { +-#ifdef HAVE_PRLIMIT ++#if 0 + struct rlimit ol, nl; + GThread *thread; + GError *error; diff --git a/gnu/packages/patches/glib-tests-timer.patch b/gnu/packages/patches/glib-tests-timer.patch index e37425c0c8..1ac364fcc1 100644 --- a/gnu/packages/patches/glib-tests-timer.patch +++ b/gnu/packages/patches/glib-tests-timer.patch @@ -2,6 +2,9 @@ fail depending on the elapsed microseconds. Improve rounding by adding a fractional bit. +* The /timer/stop test fails if compiler optimizations are enabled, which they + are by default. Disable that test. + --- glib-2.40.0/glib/tests/timer.c 2014-03-05 08:05:42.000000000 -0600 +++ glib-2.40.0/glib/tests/timer.c 2014-07-10 16:33:12.746862822 -0500 @@ -35,7 +35,7 @@ @@ -13,3 +16,11 @@ g_timer_destroy (timer); } +@@ -204,7 +204,6 @@ + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/timer/basic", test_timer_basic); +- g_test_add_func ("/timer/stop", test_timer_stop); + g_test_add_func ("/timer/continue", test_timer_continue); + g_test_add_func ("/timer/reset", test_timer_reset); + g_test_add_func ("/timeval/add", test_timeval_add); diff --git a/gnu/packages/patches/gtk2-theme-paths.patch b/gnu/packages/patches/gtk2-theme-paths.patch deleted file mode 100644 index 6c1351e516..0000000000 --- a/gnu/packages/patches/gtk2-theme-paths.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Jookia <166291@gmail.com> -Subject: [PATCHv2] gtk: Patch GTK+ to look for themes in profiles. -To: guix-devel@gnu.org -Date: Sun, 13 Mar 2016 15:17:37 +1100 -Url: https://lists.gnu.org/archive/html/guix-devel/2016-03/msg00492.html - -diff -Naur gtk+-2.24.28.new/gtk/gtkrc.c gtk+-2.24.28/gtk/gtkrc.c ---- gtk+-2.24.28.new/gtk/gtkrc.c 2016-03-13 10:31:14.413644362 +1100 -+++ gtk+-2.24.28/gtk/gtkrc.c 2016-03-13 12:51:34.723398423 +1100 -@@ -808,6 +808,8 @@ - gchar *path = NULL; - const gchar *home_dir; - gchar *subpath; -+ const gchar * const *xdg_data_dirs; -+ gint i; - - if (type) - subpath = g_strconcat ("gtk-2.0-", type, -@@ -830,6 +832,22 @@ - } - - if (!path) -+ { -+ xdg_data_dirs = g_get_system_data_dirs (); -+ for (i = 0; xdg_data_dirs[i]; i++) -+ { -+ path = g_build_filename (xdg_data_dirs[i], "themes", name, subpath, NULL); -+ if (g_file_test (path, G_FILE_TEST_EXISTS)) -+ break; -+ else -+ { -+ g_free (path); -+ path = NULL; -+ } -+ } -+ } -+ -+ if (!path) - { - gchar *theme_dir = gtk_rc_get_theme_dir (); - path = g_build_filename (theme_dir, name, subpath, NULL); diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 74840f1c95..1d33be85d5 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -52,16 +52,19 @@ (define-public poppler (package (name "poppler") - (version "0.42.0") + (version "0.37.0") (source (origin (method url-fetch) (uri (string-append "https://poppler.freedesktop.org/poppler-" version ".tar.xz")) - (sha256 - (base32 - "044084dbp804flwf7bw3lbwfdigm9s0psm6sw2j1hkrazrphgvwz")))) + (sha256 (base32 + "1vjvd0md8y37hlq3lsj0l01a3v3mzm572rzpn1311frvmrg9r7xq")))) (build-system gnu-build-system) - ;; FIXME: + ;; FIXME: more dependencies could be added + ;; cairo output: no (requires cairo >= 1.10.0) + ;; qt4 wrapper: no + ;; introspection: no + ;; use gtk-doc: no ;; use libcurl: no (inputs `(("fontconfig" ,fontconfig) ("freetype" ,freetype) @@ -80,8 +83,7 @@ ("glib" ,glib))) (native-inputs `(("pkg-config" ,pkg-config) - ("glib" ,glib "bin") ; glib-mkenums, etc. - ("gobject-introspection" ,gobject-introspection))) + ("glib" ,glib "bin"))) ; glib-mkenums, etc. (arguments `(#:tests? #f ; no test data provided with the tarball #:configure-flags diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index bb74485c76..126e997673 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -196,7 +196,7 @@ following the mouse.") (define-public pixman (package (name "pixman") - (version "0.34.0") + (version "0.32.8") (source (origin (method url-fetch) (uri (string-append @@ -204,7 +204,7 @@ following the mouse.") version ".tar.gz")) (sha256 (base32 - "13m842m9ffac3m9r0b4lvwjhwzg3w4353djkjpf00s0wnm4v5di1")))) + "0pfn0247sjsi95kwjih0wwqpp28wadihqk1bn28x6iqbqhbxwnjp")))) (build-system gnu-build-system) (inputs `(("libpng" ,libpng) -- cgit v1.2.3 From 6fdc73e099fd92bbdc4419b810a807afce4a8771 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Thu, 28 Apr 2016 10:42:52 +0800 Subject: gnu: fltk: Fix undefined symbol `Fl_XFont_On_Demand::value'. * gnu/packages/patches/fltk-xfont-on-demand.patch: New patch. * gnu/packages/fltk.scm (fltk)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/fltk.scm | 3 +- gnu/packages/patches/fltk-xfont-on-demand.patch | 45 +++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/fltk-xfont-on-demand.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3cdf5e45ed..80017ea354 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -477,6 +477,7 @@ dist_patch_DATA = \ gnu/packages/patches/flashrom-use-libftdi1.patch \ gnu/packages/patches/flint-ldconfig.patch \ gnu/packages/patches/fltk-shared-lib-defines.patch \ + gnu/packages/patches/fltk-xfont-on-demand.patch \ gnu/packages/patches/fontforge-svg-modtime.patch \ gnu/packages/patches/freeimage-CVE-2015-0852.patch \ gnu/packages/patches/gawk-fts-test.patch \ diff --git a/gnu/packages/fltk.scm b/gnu/packages/fltk.scm index a0180c0432..bc6b4ab5e6 100644 --- a/gnu/packages/fltk.scm +++ b/gnu/packages/fltk.scm @@ -47,7 +47,8 @@ (sha256 (base32 "15qd7lkz5d5ynz70xhxhigpz3wns39v9xcf7ggkl0792syc8sfgq")) - (patches (search-patches "fltk-shared-lib-defines.patch")))) + (patches (search-patches "fltk-shared-lib-defines.patch" + "fltk-xfont-on-demand.patch")))) (build-system gnu-build-system) (inputs `(("libjpeg" ,libjpeg-8) ;jpeg_read_header argument error in libjpeg-9 diff --git a/gnu/packages/patches/fltk-xfont-on-demand.patch b/gnu/packages/patches/fltk-xfont-on-demand.patch new file mode 100644 index 0000000000..cdcdd9af05 --- /dev/null +++ b/gnu/packages/patches/fltk-xfont-on-demand.patch @@ -0,0 +1,45 @@ +Fixes undefined reference to `Fl_XFont_On_Demand::value()'. +From . + +Index: src/fl_font.cxx +=================================================================== +--- fltk-1.3.3/src/fl_font.cxx (revision 10503) ++++ fltk-1.3.3/src/fl_font.cxx (revision 10504) +@@ -55,6 +55,12 @@ + # include "fl_font_x.cxx" + #endif // WIN32 + ++#if ! (defined(WIN32) || defined(__APPLE__)) ++XFontStruct *fl_X_core_font() ++{ ++ return fl_xfont.value(); ++} ++#endif + + double fl_width(const char* c) { + if (c) return fl_width(c, (int) strlen(c)); +Index: src/gl_draw.cxx +=================================================================== +--- fltk-1.3.3/src/gl_draw.cxx (revision 10503) ++++ fltk-1.3.3/src/gl_draw.cxx (revision 10504) +@@ -81,7 +81,7 @@ + * then sorting through them at draw time (for normal X rendering) to find which one can + * render the current glyph... But for now, just use the first font in the list for GL... + */ +- XFontStruct *font = fl_xfont; ++ XFontStruct *font = fl_X_core_font(); + int base = font->min_char_or_byte2; + int count = font->max_char_or_byte2-base+1; + fl_fontsize->listbase = glGenLists(256); +Index: FL/x.H +=================================================================== +--- fltk-1.3.3/FL/x.H (revision 10503) ++++ fltk-1.3.3/FL/x.H (revision 10504) +@@ -132,6 +132,7 @@ + XFontStruct *ptr; + }; + extern FL_EXPORT Fl_XFont_On_Demand fl_xfont; ++extern FL_EXPORT XFontStruct* fl_X_core_font(); + + // this object contains all X-specific stuff about a window: + // Warning: this object is highly subject to change! -- cgit v1.2.3 From dde2a94c095f840578c307ebf23cd7c3ba5ec858 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 27 Apr 2016 22:33:02 -0400 Subject: gnu: icecat: Add fixes for CVE-2016-{2805,2807,2808,2814} etc. * gnu/packages/patches/icecat-CVE-2016-2805.patch, gnu/packages/patches/icecat-CVE-2016-2807-pt1.patch, gnu/packages/patches/icecat-CVE-2016-2807-pt2.patch, gnu/packages/patches/icecat-CVE-2016-2807-pt3.patch, gnu/packages/patches/icecat-CVE-2016-2807-pt4.patch, gnu/packages/patches/icecat-CVE-2016-2807-pt5.patch, gnu/packages/patches/icecat-CVE-2016-2808.patch, gnu/packages/patches/icecat-CVE-2016-2814.patch, gnu/packages/patches/icecat-update-bundled-graphite2: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/gnuzilla.scm (icecat)[source]: Add patches. icecat fixup --- gnu/local.mk | 9 + gnu/packages/gnuzilla.scm | 11 +- gnu/packages/patches/icecat-CVE-2016-2805.patch | 75 + .../patches/icecat-CVE-2016-2807-pt1.patch | 35 + .../patches/icecat-CVE-2016-2807-pt2.patch | 69 + .../patches/icecat-CVE-2016-2807-pt3.patch | 33 + .../patches/icecat-CVE-2016-2807-pt4.patch | 37 + .../patches/icecat-CVE-2016-2807-pt5.patch | 35 + gnu/packages/patches/icecat-CVE-2016-2808.patch | 389 +++ gnu/packages/patches/icecat-CVE-2016-2814.patch | 35 + .../patches/icecat-update-bundled-graphite2.patch | 2488 ++++++++++++++++++++ 11 files changed, 3215 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/icecat-CVE-2016-2805.patch create mode 100644 gnu/packages/patches/icecat-CVE-2016-2807-pt1.patch create mode 100644 gnu/packages/patches/icecat-CVE-2016-2807-pt2.patch create mode 100644 gnu/packages/patches/icecat-CVE-2016-2807-pt3.patch create mode 100644 gnu/packages/patches/icecat-CVE-2016-2807-pt4.patch create mode 100644 gnu/packages/patches/icecat-CVE-2016-2807-pt5.patch create mode 100644 gnu/packages/patches/icecat-CVE-2016-2808.patch create mode 100644 gnu/packages/patches/icecat-CVE-2016-2814.patch create mode 100644 gnu/packages/patches/icecat-update-bundled-graphite2.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 80017ea354..9e31ef9a4b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -530,6 +530,15 @@ dist_patch_DATA = \ gnu/packages/patches/hydra-disable-darcs-test.patch \ gnu/packages/patches/icecat-avoid-bundled-includes.patch \ gnu/packages/patches/icecat-re-enable-DHE-cipher-suites.patch \ + gnu/packages/patches/icecat-update-bundled-graphite2.patch \ + gnu/packages/patches/icecat-CVE-2016-2805.patch \ + gnu/packages/patches/icecat-CVE-2016-2807-pt1.patch \ + gnu/packages/patches/icecat-CVE-2016-2807-pt2.patch \ + gnu/packages/patches/icecat-CVE-2016-2807-pt3.patch \ + gnu/packages/patches/icecat-CVE-2016-2807-pt4.patch \ + gnu/packages/patches/icecat-CVE-2016-2807-pt5.patch \ + gnu/packages/patches/icecat-CVE-2016-2808.patch \ + gnu/packages/patches/icecat-CVE-2016-2814.patch \ gnu/packages/patches/icu4c-CVE-2014-6585.patch \ gnu/packages/patches/icu4c-CVE-2015-1270.patch \ gnu/packages/patches/icu4c-CVE-2015-4760.patch \ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index e774ed1ad2..abefd90304 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -299,7 +299,16 @@ standards.") "1wdmd6hasra36g86ha1dw8sl7a5mvr7c4jbjx4zyg9629y5gqr8g")) (patches (search-patches "icecat-avoid-bundled-includes.patch" - "icecat-re-enable-DHE-cipher-suites.patch")) + "icecat-re-enable-DHE-cipher-suites.patch" + "icecat-update-bundled-graphite2.patch" + "icecat-CVE-2016-2805.patch" + "icecat-CVE-2016-2807-pt1.patch" + "icecat-CVE-2016-2807-pt2.patch" + "icecat-CVE-2016-2807-pt3.patch" + "icecat-CVE-2016-2807-pt4.patch" + "icecat-CVE-2016-2807-pt5.patch" + "icecat-CVE-2016-2808.patch" + "icecat-CVE-2016-2814.patch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/icecat-CVE-2016-2805.patch b/gnu/packages/patches/icecat-CVE-2016-2805.patch new file mode 100644 index 0000000000..5e4150f00c --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2016-2805.patch @@ -0,0 +1,75 @@ +Copied from https://hg.mozilla.org/releases/mozilla-esr38/raw-rev/bf34b97757b3 + +# HG changeset patch +# User Jon Coppeard +# Date 1453890675 0 +# Node ID bf34b97757b334af1f9f53b9b59e0b6902e7ed6f +# Parent 228ca3f46cabaf3f388f6c6640690772aa13c1a5 +Bug 1241731 - Handle incomplete buffer in DiscardTransferables r=sfink a=abillings a=sylvestre + +diff --git a/js/src/jit-test/tests/gc/bug-1241731.js b/js/src/jit-test/tests/gc/bug-1241731.js +new file mode 100644 +--- /dev/null ++++ b/js/src/jit-test/tests/gc/bug-1241731.js +@@ -0,0 +1,4 @@ ++if (!('oomTest' in this)) ++ quit(); ++ ++oomTest(() => serialize(0, [{}])); +diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp +--- a/js/src/vm/StructuredClone.cpp ++++ b/js/src/vm/StructuredClone.cpp +@@ -379,39 +379,50 @@ ReadStructuredClone(JSContext* cx, uint6 + + // If the given buffer contains Transferables, free them. Note that custom + // Transferables will use the JSStructuredCloneCallbacks::freeTransfer() to + // delete their transferables. + static void + Discard(uint64_t* buffer, size_t nbytes, const JSStructuredCloneCallbacks* cb, void* cbClosure) + { + MOZ_ASSERT(nbytes % sizeof(uint64_t) == 0); +- if (nbytes < sizeof(uint64_t)) ++ uint64_t* end = buffer + nbytes / sizeof(uint64_t); ++ uint64_t* point = buffer; ++ if (point == end) + return; // Empty buffer + +- uint64_t* point = buffer; + uint32_t tag, data; + SCInput::getPair(point++, &tag, &data); + if (tag != SCTAG_TRANSFER_MAP_HEADER) + return; + + if (TransferableMapHeader(data) == SCTAG_TM_TRANSFERRED) + return; + + // freeTransfer should not GC + JS::AutoSuppressGCAnalysis nogc; + ++ if (point == end) ++ return; ++ + uint64_t numTransferables = LittleEndian::readUint64(point++); + while (numTransferables--) { ++ if (point == end) ++ return; ++ + uint32_t ownership; + SCInput::getPair(point++, &tag, &ownership); + MOZ_ASSERT(tag >= SCTAG_TRANSFER_MAP_PENDING_ENTRY); ++ if (point == end) ++ return; + + void* content; + SCInput::getPtr(point++, &content); ++ if (point == end) ++ return; + + uint64_t extraData = LittleEndian::readUint64(point++); + + if (ownership < JS::SCTAG_TMO_FIRST_OWNED) + continue; + + if (ownership == JS::SCTAG_TMO_ALLOC_DATA) { + js_free(content); + diff --git a/gnu/packages/patches/icecat-CVE-2016-2807-pt1.patch b/gnu/packages/patches/icecat-CVE-2016-2807-pt1.patch new file mode 100644 index 0000000000..0a6bee378b --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2016-2807-pt1.patch @@ -0,0 +1,35 @@ +Copied from https://hg.mozilla.org/releases/mozilla-esr38/raw-rev/e7c23c08bf84 + +# HG changeset patch +# User Randell Jesup +# Date 1458543433 14400 +# Node ID e7c23c08bf84a02d9154f31e0c5d121a45884a69 +# Parent a6de1f453712edabff597879398606708c191098 +Bug 1254876: assert windows recording is shut down r=pkerr a=ritu + +MozReview-Commit-ID: JRqxBb5TgrE + +diff --git a/media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_core_win.cc b/media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_core_win.cc +--- a/media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_core_win.cc ++++ b/media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_core_win.cc +@@ -567,16 +567,19 @@ AudioDeviceWindowsCore::AudioDeviceWindo + // ---------------------------------------------------------------------------- + + AudioDeviceWindowsCore::~AudioDeviceWindowsCore() + { + WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id, "%s destroyed", __FUNCTION__); + + Terminate(); + ++ // Recording thread should be shut down before this! ++ assert(_hRecThread == NULL); ++ + // The IMMDeviceEnumerator is created during construction. Must release + // it here and not in Terminate() since we don't recreate it in Init(). + SAFE_RELEASE(_ptrEnumerator); + + _ptrAudioBuffer = NULL; + + if (NULL != _hRenderSamplesReadyEvent) + { + diff --git a/gnu/packages/patches/icecat-CVE-2016-2807-pt2.patch b/gnu/packages/patches/icecat-CVE-2016-2807-pt2.patch new file mode 100644 index 0000000000..f4b4c0d4eb --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2016-2807-pt2.patch @@ -0,0 +1,69 @@ +Copied from https://hg.mozilla.org/releases/mozilla-esr38/raw-rev/3d2b62083a6a + +# HG changeset patch +# User Shu-yu Guo +# Date 1459741387 -7200 +# Node ID 3d2b62083a6a4fb43cb330d77142f9dce0959a23 +# Parent 9d4364f6b55c6ee65c13c491292c3abe1ee2c993 +Bug 1254164 - Make aliasedBodyLevelLexicalBegin a uint32. r=Waldo, a=ritu + +diff --git a/js/src/jit-test/tests/parser/bug-1254164.js b/js/src/jit-test/tests/parser/bug-1254164.js +new file mode 100644 +--- /dev/null ++++ b/js/src/jit-test/tests/parser/bug-1254164.js +@@ -0,0 +1,6 @@ ++// |jit-test| slow; ++ ++var s = ''; ++for (var i = 0; i < 70000; i++) ++ s += 'function x' + i + '() { x' + i + '(); }\n'; ++eval("(function() { " + s + " })();"); +diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp +--- a/js/src/jsscript.cpp ++++ b/js/src/jsscript.cpp +@@ -111,17 +111,20 @@ Bindings::initWithTemporaryStorage(Exclu + // JITs when interpreting/compiling aliasedvar ops.) + + // Since unaliased variables are, by definition, only accessed by local + // operations and never through the scope chain, only give shapes to + // aliased variables. While the debugger may observe any scope object at + // any time, such accesses are mediated by DebugScopeProxy (see + // DebugScopeProxy::handleUnaliasedAccess). + uint32_t nslots = CallObject::RESERVED_SLOTS; +- uint32_t aliasedBodyLevelLexicalBegin = UINT16_MAX; ++ ++ // Unless there are aliased body-level lexical bindings at all, set the ++ // begin index to an impossible slot number. ++ uint32_t aliasedBodyLevelLexicalBegin = LOCALNO_LIMIT; + for (BindingIter bi(self); bi; bi++) { + if (bi->aliased()) { + // Per ES6, lexical bindings cannot be accessed until + // initialized. Remember the first aliased slot that is a + // body-level lexical, so that they may be initialized to sentinel + // magic values. + if (numBodyLevelLexicals > 0 && + nslots < aliasedBodyLevelLexicalBegin && +diff --git a/js/src/jsscript.h b/js/src/jsscript.h +--- a/js/src/jsscript.h ++++ b/js/src/jsscript.h +@@ -201,18 +201,18 @@ class Bindings + friend class BindingIter; + friend class AliasedFormalIter; + + RelocatablePtrShape callObjShape_; + uintptr_t bindingArrayAndFlag_; + uint16_t numArgs_; + uint16_t numBlockScoped_; + uint16_t numBodyLevelLexicals_; +- uint16_t aliasedBodyLevelLexicalBegin_; + uint16_t numUnaliasedBodyLevelLexicals_; ++ uint32_t aliasedBodyLevelLexicalBegin_; + uint32_t numVars_; + uint32_t numUnaliasedVars_; + + #if JS_BITS_PER_WORD == 32 + // Bindings is allocated inline inside JSScript, which needs to be + // gc::Cell aligned. + uint32_t padding_; + #endif + diff --git a/gnu/packages/patches/icecat-CVE-2016-2807-pt3.patch b/gnu/packages/patches/icecat-CVE-2016-2807-pt3.patch new file mode 100644 index 0000000000..a5a4212c28 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2016-2807-pt3.patch @@ -0,0 +1,33 @@ +Copied from https://hg.mozilla.org/releases/mozilla-esr38/raw-rev/88f1eb2c3f4b + +# HG changeset patch +# User Timothy Nikkel +# Date 1457637807 21600 +# Node ID 88f1eb2c3f4b4b57365ed88223cf8adc2bec4610 +# Parent bf34b97757b334af1f9f53b9b59e0b6902e7ed6f +Bug 1187420. r=drc r=jmuizelaar a=sylvestre + +MozReview-Commit-ID: Hh0Khqfj8Bf + +diff --git a/media/libjpeg/jstdhuff.c b/media/libjpeg/jstdhuff.c +--- a/media/libjpeg/jstdhuff.c ++++ b/media/libjpeg/jstdhuff.c +@@ -36,16 +36,17 @@ add_huff_table (j_common_ptr cinfo, + */ + nsymbols = 0; + for (len = 1; len <= 16; len++) + nsymbols += bits[len]; + if (nsymbols < 1 || nsymbols > 256) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + + MEMCOPY((*htblptr)->huffval, val, nsymbols * sizeof(UINT8)); ++ MEMZERO(&((*htblptr)->huffval[nsymbols]), (256 - nsymbols) * sizeof(UINT8)); + + /* Initialize sent_table FALSE so table will be written to JPEG file. */ + (*htblptr)->sent_table = FALSE; + } + + + LOCAL(void) + std_huff_tables (j_common_ptr cinfo) + diff --git a/gnu/packages/patches/icecat-CVE-2016-2807-pt4.patch b/gnu/packages/patches/icecat-CVE-2016-2807-pt4.patch new file mode 100644 index 0000000000..5eff4fe99c --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2016-2807-pt4.patch @@ -0,0 +1,37 @@ +Copied from https://hg.mozilla.org/releases/mozilla-esr38/raw-rev/5c312182da90 + +# HG changeset patch +# User Jan de Mooij +# Date 1458828581 -3600 +# Node ID 5c312182da9020504103aa329360abaffa7e232d +# Parent fa4efccde9b7efde8763a178a6cf422b6d37a0e9 +Bug 1254622 - Relookup group->newScript in CreateThisForFunctionWithGroup. r=bhackett a=sylvestre + +MozReview-Commit-ID: KXd7kB70f1Z + +diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp +--- a/js/src/jsobj.cpp ++++ b/js/src/jsobj.cpp +@@ -1574,18 +1574,19 @@ CreateThisForFunctionWithGroup(JSContext + // Not enough objects with this group have been created yet, so make a + // plain object and register it with the group. Use the maximum number + // of fixed slots, as is also required by the TypeNewScript. + gc::AllocKind allocKind = GuessObjectGCKind(NativeObject::MAX_FIXED_SLOTS); + PlainObject* res = NewObjectWithGroup(cx, group, parent, allocKind, newKind); + if (!res) + return nullptr; + +- if (newKind != SingletonObject) +- newScript->registerNewObject(res); ++ // Make sure group->newScript is still there. ++ if (newKind != SingletonObject && group->newScript()) ++ group->newScript()->registerNewObject(res); + + return res; + } + + gc::AllocKind allocKind = NewObjectGCKind(&PlainObject::class_); + + if (newKind == SingletonObject) { + Rooted protoRoot(cx, group->proto()); + diff --git a/gnu/packages/patches/icecat-CVE-2016-2807-pt5.patch b/gnu/packages/patches/icecat-CVE-2016-2807-pt5.patch new file mode 100644 index 0000000000..00718ebaac --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2016-2807-pt5.patch @@ -0,0 +1,35 @@ +Copied from https://hg.mozilla.org/releases/mozilla-esr38/raw-rev/3fdd280fa099 + +# HG changeset patch +# User Carsten "Tomcat" Book +# Date 1461123938 -7200 +# Node ID 3fdd280fa099b6453ce9fd9905af883bc2ebce24 +# Parent 52dfdd37150d62f708dc5bf61dd28f3967596788 +Bug 1252707 - a=sylvestre + +diff --git a/js/src/vm/Shape.cpp b/js/src/vm/Shape.cpp +--- a/js/src/vm/Shape.cpp ++++ b/js/src/vm/Shape.cpp +@@ -382,18 +382,20 @@ NativeObject::getChildPropertyOnDictiona + + if (obj->inDictionaryMode()) { + MOZ_ASSERT(parent == obj->lastProperty()); + RootedGeneric childRoot(cx, &child); + shape = childRoot->isAccessorShape() ? NewGCAccessorShape(cx) : NewGCShape(cx); + if (!shape) + return nullptr; + if (childRoot->hasSlot() && childRoot->slot() >= obj->lastProperty()->base()->slotSpan()) { +- if (!obj->setSlotSpan(cx, childRoot->slot() + 1)) ++ if (!obj->setSlotSpan(cx, childRoot->slot() + 1)) { ++ new (shape) Shape(obj->lastProperty()->base()->unowned(), 0); + return nullptr; ++ } + } + shape->initDictionaryShape(*childRoot, obj->numFixedSlots(), &obj->shape_); + } + + return shape; + } + + /* static */ Shape* + diff --git a/gnu/packages/patches/icecat-CVE-2016-2808.patch b/gnu/packages/patches/icecat-CVE-2016-2808.patch new file mode 100644 index 0000000000..ae190b8b4c --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2016-2808.patch @@ -0,0 +1,389 @@ +Copied from https://hg.mozilla.org/releases/mozilla-esr38/raw-rev/71f611fd27c7 + +# HG changeset patch +# User Jeff Walden +# Date 1458941573 25200 +# Node ID 71f611fd27c7d6cb7d6dab9895c2922948042543 +# Parent 861f6b83ce1deade2a976cabe059776ad51ce370 +Bug 1246061. r=luke, r=froydnj, a=sylvestre + +diff --git a/js/public/HashTable.h b/js/public/HashTable.h +--- a/js/public/HashTable.h ++++ b/js/public/HashTable.h +@@ -8,16 +8,17 @@ + #define js_HashTable_h + + #include "mozilla/Alignment.h" + #include "mozilla/Assertions.h" + #include "mozilla/Attributes.h" + #include "mozilla/Casting.h" + #include "mozilla/MemoryReporting.h" + #include "mozilla/Move.h" ++#include "mozilla/Opaque.h" + #include "mozilla/PodOperations.h" + #include "mozilla/ReentrancyGuard.h" + #include "mozilla/TemplateLib.h" + #include "mozilla/TypeTraits.h" + + #include "js/Utility.h" + + namespace js { +@@ -27,16 +28,18 @@ template struct DefaultHasher; + template class HashMapEntry; + namespace detail { + template class HashTableEntry; + template class HashTable; + } + + /*****************************************************************************/ + ++using Generation = mozilla::Opaque; ++ + // A JS-friendly, STL-like container providing a hash-based map from keys to + // values. In particular, HashMap calls constructors and destructors of all + // objects added so non-PODs may be used safely. + // + // Key/Value requirements: + // - movable, destructible, assignable + // HashPolicy requirements: + // - see Hash Policy section below +@@ -200,17 +203,19 @@ class HashMap + return impl.sizeOfExcludingThis(mallocSizeOf); + } + size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const { + return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf); + } + + // If |generation()| is the same before and after a HashMap operation, + // pointers into the table remain valid. +- uint32_t generation() const { return impl.generation(); } ++ Generation generation() const { ++ return impl.generation(); ++ } + + /************************************************** Shorthand operations */ + + bool has(const Lookup& l) const { + return impl.lookup(l).found(); + } + + // Overwrite existing value with v. Return false on oom. +@@ -431,17 +436,19 @@ class HashSet + return impl.sizeOfExcludingThis(mallocSizeOf); + } + size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const { + return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf); + } + + // If |generation()| is the same before and after a HashSet operation, + // pointers into the table remain valid. +- uint32_t generation() const { return impl.generation(); } ++ Generation generation() const { ++ return impl.generation(); ++ } + + /************************************************** Shorthand operations */ + + bool has(const Lookup& l) const { + return impl.lookup(l).found(); + } + + // Add |u| if it is not present already. Return false on oom. +@@ -766,17 +773,17 @@ class HashTable : private AllocPolicy + // table operations unless |generation()| is tested. + class Ptr + { + friend class HashTable; + + Entry* entry_; + #ifdef JS_DEBUG + const HashTable* table_; +- uint32_t generation; ++ Generation generation; + #endif + + protected: + Ptr(Entry& entry, const HashTable& tableArg) + : entry_(&entry) + #ifdef JS_DEBUG + , table_(&tableArg) + , generation(tableArg.generation()) +@@ -873,17 +880,17 @@ class HashTable : private AllocPolicy + while (cur < end && !cur->isLive()) + ++cur; + } + + Entry* cur, *end; + #ifdef JS_DEBUG + const HashTable* table_; + uint64_t mutationCount; +- uint32_t generation; ++ Generation generation; + bool validEntry; + #endif + + public: + Range() + : cur(nullptr) + , end(nullptr) + #ifdef JS_DEBUG +@@ -1012,18 +1019,18 @@ class HashTable : private AllocPolicy + // HashTable is not copyable or assignable + HashTable(const HashTable&) = delete; + void operator=(const HashTable&) = delete; + + private: + static const size_t CAP_BITS = 24; + + public: +- Entry* table; // entry storage +- uint32_t gen; // entry storage generation number ++ uint64_t gen; // entry storage generation number ++ Entry* table; // entry storage + uint32_t entryCount; // number of entries in table + uint32_t removedCount:CAP_BITS; // removed entry sentinels in table + uint32_t hashShift:8; // multiplicative hash shift + + #ifdef JS_DEBUG + uint64_t mutationCount; + mutable bool mEntered; + mutable struct Stats +@@ -1097,18 +1104,18 @@ class HashTable : private AllocPolicy + for (Entry* e = oldTable, *end = e + capacity; e < end; ++e) + e->destroyIfLive(); + alloc.free_(oldTable); + } + + public: + explicit HashTable(AllocPolicy ap) + : AllocPolicy(ap) ++ , gen(0) + , table(nullptr) +- , gen(0) + , entryCount(0) + , removedCount(0) + , hashShift(sHashBits) + #ifdef JS_DEBUG + , mutationCount(0) + , mEntered(false) + #endif + {} +@@ -1524,20 +1531,20 @@ class HashTable : private AllocPolicy + } + + uint32_t capacity() const + { + MOZ_ASSERT(table); + return JS_BIT(sHashBits - hashShift); + } + +- uint32_t generation() const ++ Generation generation() const + { + MOZ_ASSERT(table); +- return gen; ++ return Generation(gen); + } + + size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const + { + return mallocSizeOf(table); + } + + size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const +diff --git a/js/src/jsapi.h b/js/src/jsapi.h +--- a/js/src/jsapi.h ++++ b/js/src/jsapi.h +@@ -270,20 +270,16 @@ class AutoHashMapRooter : protected Auto + + size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const { + return map.sizeOfExcludingThis(mallocSizeOf); + } + size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const { + return map.sizeOfIncludingThis(mallocSizeOf); + } + +- uint32_t generation() const { +- return map.generation(); +- } +- + /************************************************** Shorthand operations */ + + bool has(const Lookup& l) const { + return map.has(l); + } + + template + bool put(const KeyInput& k, const ValueInput& v) { +@@ -385,20 +381,16 @@ class AutoHashSetRooter : protected Auto + + size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const { + return set.sizeOfExcludingThis(mallocSizeOf); + } + size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const { + return set.sizeOfIncludingThis(mallocSizeOf); + } + +- uint32_t generation() const { +- return set.generation(); +- } +- + /************************************************** Shorthand operations */ + + bool has(const Lookup& l) const { + return set.has(l); + } + + bool put(const T& t) { + return set.put(t); +diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h +--- a/js/src/jscntxt.h ++++ b/js/src/jscntxt.h +@@ -30,21 +30,21 @@ class DebugModeOSRVolatileJitFrameIterat + } + + typedef HashSet ObjectSet; + typedef HashSet ShapeSet; + + /* Detects cycles when traversing an object graph. */ + class AutoCycleDetector + { ++ Generation hashsetGenerationAtInit; + JSContext* cx; + RootedObject obj; ++ ObjectSet::AddPtr hashsetAddPointer; + bool cyclic; +- uint32_t hashsetGenerationAtInit; +- ObjectSet::AddPtr hashsetAddPointer; + MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER + + public: + AutoCycleDetector(JSContext* cx, HandleObject objArg + MOZ_GUARD_OBJECT_NOTIFIER_PARAM) + : cx(cx), obj(cx, objArg), cyclic(true) + { + MOZ_GUARD_OBJECT_NOTIFIER_INIT; +diff --git a/js/src/jswatchpoint.cpp b/js/src/jswatchpoint.cpp +--- a/js/src/jswatchpoint.cpp ++++ b/js/src/jswatchpoint.cpp +@@ -22,25 +22,25 @@ DefaultHasher::hash(const Look + { + return DefaultHasher::hash(key.object.get()) ^ HashId(key.id.get()); + } + + namespace { + + class AutoEntryHolder { + typedef WatchpointMap::Map Map; ++ Generation gen; + Map& map; + Map::Ptr p; +- uint32_t gen; + RootedObject obj; + RootedId id; + + public: + AutoEntryHolder(JSContext* cx, Map& map, Map::Ptr p) +- : map(map), p(p), gen(map.generation()), obj(cx, p->key().object), id(cx, p->key().id) ++ : gen(map.generation()), map(map), p(p), obj(cx, p->key().object), id(cx, p->key().id) + { + MOZ_ASSERT(!p->value().held); + p->value().held = true; + } + + ~AutoEntryHolder() { + if (gen != map.generation()) + p = map.lookup(WatchKey(obj, id)); +diff --git a/js/src/shell/jsheaptools.cpp b/js/src/shell/jsheaptools.cpp +--- a/js/src/shell/jsheaptools.cpp ++++ b/js/src/shell/jsheaptools.cpp +@@ -267,17 +267,17 @@ HeapReverser::traverseEdge(void* cell, J + Map::AddPtr a = map.lookupForAdd(cell); + if (!a) { + /* + * We've never visited this cell before. Add it to the map (thus + * marking it as visited), and put it on the work stack, to be + * visited from the main loop. + */ + Node n(kind); +- uint32_t generation = map.generation(); ++ Generation generation = map.generation(); + if (!map.add(a, cell, Move(n)) || + !work.append(Child(cell, kind))) + return false; + /* If the map has been resized, re-check the pointer. */ + if (map.generation() != generation) + a = map.lookupForAdd(cell); + } + +diff --git a/mfbt/Opaque.h b/mfbt/Opaque.h +new file mode 100644 +--- /dev/null ++++ b/mfbt/Opaque.h +@@ -0,0 +1,44 @@ ++/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* vim: set ts=8 sts=2 et sw=2 tw=80: */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++/* An opaque integral type supporting only comparison operators. */ ++ ++#ifndef mozilla_Opaque_h ++#define mozilla_Opaque_h ++ ++#include "mozilla/TypeTraits.h" ++ ++namespace mozilla { ++ ++/** ++ * Opaque is a replacement for integral T in cases where only comparisons ++ * must be supported, and it's desirable to prevent accidental dependency on ++ * exact values. ++ */ ++template ++class Opaque final ++{ ++ static_assert(mozilla::IsIntegral::value, ++ "mozilla::Opaque only supports integral types"); ++ ++ T mValue; ++ ++public: ++ Opaque() {} ++ explicit Opaque(T aValue) : mValue(aValue) {} ++ ++ bool operator==(const Opaque& aOther) const { ++ return mValue == aOther.mValue; ++ } ++ ++ bool operator!=(const Opaque& aOther) const { ++ return !(*this == aOther); ++ } ++}; ++ ++} // namespace mozilla ++ ++#endif /* mozilla_Opaque_h */ +diff --git a/mfbt/moz.build b/mfbt/moz.build +--- a/mfbt/moz.build ++++ b/mfbt/moz.build +@@ -48,16 +48,17 @@ EXPORTS.mozilla = [ + 'MathAlgorithms.h', + 'Maybe.h', + 'MaybeOneOf.h', + 'MemoryChecking.h', + 'MemoryReporting.h', + 'Move.h', + 'NullPtr.h', + 'NumericLimits.h', ++ 'Opaque.h', + 'Pair.h', + 'PodOperations.h', + 'Poison.h', + 'Range.h', + 'RangedPtr.h', + 'RefCountType.h', + 'ReentrancyGuard.h', + 'RefPtr.h', + diff --git a/gnu/packages/patches/icecat-CVE-2016-2814.patch b/gnu/packages/patches/icecat-CVE-2016-2814.patch new file mode 100644 index 0000000000..5f197f25e6 --- /dev/null +++ b/gnu/packages/patches/icecat-CVE-2016-2814.patch @@ -0,0 +1,35 @@ + +# HG changeset patch +# User Jean-Yves Avenard +# Date 1460655260 25200 +# Node ID a13c0bc84d6eb132f4199f563fbe228d2d3b3a51 +# Parent 88f1eb2c3f4b4b57365ed88223cf8adc2bec4610 +Bug 1254721: Ensure consistency between Cenc offsets and sizes table. r=gerald a=sylvestre + +MozReview-Commit-ID: E1KbKIIBR87 + +diff --git a/media/libstagefright/frameworks/av/media/libstagefright/SampleTable.cpp b/media/libstagefright/frameworks/av/media/libstagefright/SampleTable.cpp +--- a/media/libstagefright/frameworks/av/media/libstagefright/SampleTable.cpp ++++ b/media/libstagefright/frameworks/av/media/libstagefright/SampleTable.cpp +@@ -612,18 +612,18 @@ status_t + SampleTable::parseSampleCencInfo() { + if ((!mCencDefaultSize && !mCencInfoCount) || mCencOffsets.isEmpty()) { + // We don't have all the cenc information we need yet. Quietly fail and + // hope we get the data we need later in the track header. + ALOGV("Got half of cenc saio/saiz pair. Deferring parse until we get the other half."); + return OK; + } + +- if (!mCencSizes.isEmpty() && mCencOffsets.size() > 1 && +- mCencSizes.size() != mCencOffsets.size()) { ++ if ((mCencOffsets.size() > 1 && mCencOffsets.size() < mCencInfoCount) || ++ (!mCencDefaultSize && mCencSizes.size() < mCencInfoCount)) { + return ERROR_MALFORMED; + } + + if (mCencInfoCount > kMAX_ALLOCATION / sizeof(SampleCencInfo)) { + // Avoid future OOM. + return ERROR_MALFORMED; + } + + diff --git a/gnu/packages/patches/icecat-update-bundled-graphite2.patch b/gnu/packages/patches/icecat-update-bundled-graphite2.patch new file mode 100644 index 0000000000..c3ab920335 --- /dev/null +++ b/gnu/packages/patches/icecat-update-bundled-graphite2.patch @@ -0,0 +1,2488 @@ + +# HG changeset patch +# User Jonathan Kew +# Date 1460660890 -3600 +# Node ID 7330633d20ffb33941e41ea0666c4099b6e6d317 +# Parent 5c312182da9020504103aa329360abaffa7e232d +Bug 1262846 (patch for ESR trees) - Update Graphite2 library to 1.3.8. r=jrmuizel a=sledru + +diff --git a/gfx/graphite2/README.mozilla b/gfx/graphite2/README.mozilla +--- a/gfx/graphite2/README.mozilla ++++ b/gfx/graphite2/README.mozilla +@@ -1,3 +1,3 @@ +-This directory contains the Graphite2 library release 1.3.6 from +-https://github.com/silnrsi/graphite/releases/download/1.3.6/graphite-minimal-1.3.6.tgz ++This directory contains the Graphite2 library release 1.3.8 from ++https://github.com/silnrsi/graphite/releases/download/1.3.8/graphite2-minimal-1.3.8.tgz + See gfx/graphite2/moz-gr-update.sh for update procedure. +diff --git a/gfx/graphite2/include/graphite2/Font.h b/gfx/graphite2/include/graphite2/Font.h +--- a/gfx/graphite2/include/graphite2/Font.h ++++ b/gfx/graphite2/include/graphite2/Font.h +@@ -25,17 +25,17 @@ + either version 2 of the License or (at your option) any later version. + */ + #pragma once + + #include "graphite2/Types.h" + + #define GR2_VERSION_MAJOR 1 + #define GR2_VERSION_MINOR 3 +-#define GR2_VERSION_BUGFIX 6 ++#define GR2_VERSION_BUGFIX 8 + + #ifdef __cplusplus + extern "C" + { + #endif + + typedef struct gr_face gr_face; + typedef struct gr_font gr_font; +diff --git a/gfx/graphite2/moz-gr-update.sh b/gfx/graphite2/moz-gr-update.sh +--- a/gfx/graphite2/moz-gr-update.sh ++++ b/gfx/graphite2/moz-gr-update.sh +@@ -14,17 +14,17 @@ + RELEASE=$1 + + if [ "x$RELEASE" == "x" ] + then + echo "Must provide the version number to be used." + exit 1 + fi + +-TARBALL="https://github.com/silnrsi/graphite/releases/download/$RELEASE/graphite-minimal-$RELEASE.tgz" ++TARBALL="https://github.com/silnrsi/graphite/releases/download/$RELEASE/graphite2-minimal-$RELEASE.tgz" + + foo=`basename $0` + TMPFILE=`mktemp -t ${foo}` || exit 1 + + curl -L "$TARBALL" -o "$TMPFILE" + tar -x -z -C gfx/graphite2/ --strip-components 1 -f "$TMPFILE" || exit 1 + rm "$TMPFILE" + +diff --git a/gfx/graphite2/src/CachedFace.cpp b/gfx/graphite2/src/CachedFace.cpp +--- a/gfx/graphite2/src/CachedFace.cpp ++++ b/gfx/graphite2/src/CachedFace.cpp +@@ -64,20 +64,20 @@ bool CachedFace::runGraphite(Segment *se + return false; + + assert(m_cacheStore); + // find where the segment can be broken + Slot * subSegStartSlot = seg->first(); + Slot * subSegEndSlot = subSegStartSlot; + uint16 cmapGlyphs[eMaxSpliceSize]; + int subSegStart = 0; +- for (unsigned int i = 0; i < seg->charInfoCount(); ++i) ++ for (unsigned int i = 0; i < seg->charInfoCount() && subSegEndSlot; ++i) + { + const unsigned int length = i - subSegStart + 1; +- if (length < eMaxSpliceSize) ++ if (length < eMaxSpliceSize && subSegEndSlot->gid() < m_cacheStore->maxCmapGid()) + cmapGlyphs[length-1] = subSegEndSlot->gid(); + else return false; + const bool spaceOnly = m_cacheStore->isSpaceGlyph(subSegEndSlot->gid()); + // at this stage the character to slot mapping is still 1 to 1 + const int breakWeight = seg->charinfo(i)->breakWeight(), + nextBreakWeight = (i + 1 < seg->charInfoCount())? + seg->charinfo(i+1)->breakWeight() : 0; + const uint8 f = seg->charinfo(i)->flags(); +diff --git a/gfx/graphite2/src/Code.cpp b/gfx/graphite2/src/Code.cpp +--- a/gfx/graphite2/src/Code.cpp ++++ b/gfx/graphite2/src/Code.cpp +@@ -61,93 +61,88 @@ inline bool is_return(const instr i) { + const instr pop_ret = *opmap[POP_RET].impl, + ret_zero = *opmap[RET_ZERO].impl, + ret_true = *opmap[RET_TRUE].impl; + return i == pop_ret || i == ret_zero || i == ret_true; + } + + struct context + { +- context(uint8 ref=0) : codeRef(ref) {flags.changed=false; flags.referenced=false; flags.inserted=false;} ++ context(uint8 ref=0) : codeRef(ref) {flags.changed=false; flags.referenced=false;} + struct { + uint8 changed:1, +- referenced:1, +- inserted:1; ++ referenced:1; + } flags; + uint8 codeRef; + }; + + } // end namespace + + + class Machine::Code::decoder + { + public: + struct limits; +- struct analysis +- { +- static const int NUMCONTEXTS = 256; +- uint8 slotref; +- context contexts[NUMCONTEXTS]; +- byte max_ref; +- +- analysis() : slotref(0), max_ref(0) {}; +- void set_ref(int index, bool incinsert=false) throw(); +- void set_noref(int index) throw(); +- void set_changed(int index) throw(); +- +- }; ++ static const int NUMCONTEXTS = 256; + + decoder(limits & lims, Code &code, enum passtype pt) throw(); + + bool load(const byte * bc_begin, const byte * bc_end); + void apply_analysis(instr * const code, instr * code_end); +- byte max_ref() { return _analysis.max_ref; } +- int pre_context() const { return _pre_context; } ++ byte max_ref() { return _max_ref; } ++ int out_index() const { return _out_index; } + + private: ++ void set_ref(int index) throw(); ++ void set_noref(int index) throw(); ++ void set_changed(int index) throw(); + opcode fetch_opcode(const byte * bc); + void analyse_opcode(const opcode, const int8 * const dp) throw(); + bool emit_opcode(opcode opc, const byte * & bc); +- bool validate_opcode(const opcode opc, const byte * const bc); ++ bool validate_opcode(const byte opc, const byte * const bc); + bool valid_upto(const uint16 limit, const uint16 x) const throw(); + bool test_context() const throw(); ++ bool test_ref(int8 index) const throw(); + void failure(const status_t s) const throw() { _code.failure(s); } + + Code & _code; +- int _pre_context; +- uint16 _rule_length; ++ int _out_index; ++ uint16 _out_length; + instr * _instr; + byte * _data; + limits & _max; +- analysis _analysis; + enum passtype _passtype; + int _stack_depth; + bool _in_ctxt_item; ++ int16 _slotref; ++ context _contexts[NUMCONTEXTS]; ++ byte _max_ref; + }; + + + struct Machine::Code::decoder::limits + { + const byte * bytecode; + const uint8 pre_context; + const uint16 rule_length, + classes, + glyf_attrs, + features; + const byte attrid[gr_slatMax]; + }; + + inline Machine::Code::decoder::decoder(limits & lims, Code &code, enum passtype pt) throw() + : _code(code), +- _pre_context(code._constraint ? 0 : lims.pre_context), +- _rule_length(code._constraint ? 1 : lims.rule_length), ++ _out_index(code._constraint ? 0 : lims.pre_context), ++ _out_length(code._constraint ? 1 : lims.rule_length), + _instr(code._code), _data(code._data), _max(lims), _passtype(pt), + _stack_depth(0), +- _in_ctxt_item(false) ++ _in_ctxt_item(false), ++ _slotref(0), ++ _max_ref(0) + { } + + + + Machine::Code::Code(bool is_constraint, const byte * bytecode_begin, const byte * const bytecode_end, + uint8 pre_context, uint16 rule_length, const Silf & silf, const Face & face, + enum passtype pt, byte * * const _out) + : _code(0), _data(0), _data_size(0), _instr_count(0), _max_ref(0), _status(loaded), +@@ -163,17 +158,17 @@ Machine::Code::Code(bool is_constraint, + return; + } + assert(bytecode_end > bytecode_begin); + const opcode_t * op_to_fn = Machine::getOpcodeTable(); + + // Allocate code and data target buffers, these sizes are a worst case + // estimate. Once we know their real sizes the we'll shrink them. + if (_out) _code = reinterpret_cast(*_out); +- else _code = static_cast(malloc(estimateCodeDataOut(bytecode_end-bytecode_begin))); ++ else _code = static_cast(malloc(estimateCodeDataOut(bytecode_end-bytecode_begin, 1, is_constraint ? 0 : rule_length))); + _data = reinterpret_cast(_code + (bytecode_end - bytecode_begin)); + + if (!_code || !_data) { + failure(alloc_failed); + return; + } + + decoder::limits lims = { +@@ -266,23 +261,23 @@ bool Machine::Code::decoder::load(const + return bool(_code); + } + + // Validation check and fixups. + // + + opcode Machine::Code::decoder::fetch_opcode(const byte * bc) + { +- const opcode opc = opcode(*bc++); ++ const byte opc = *bc++; + + // Do some basic sanity checks based on what we know about the opcode + if (!validate_opcode(opc, bc)) return MAX_OPCODE; + + // And check it's arguments as far as possible +- switch (opc) ++ switch (opcode(opc)) + { + case NOP : + break; + case PUSH_BYTE : + case PUSH_BYTEU : + case PUSH_SHORT : + case PUSH_SHORTU : + case PUSH_LONG : +@@ -319,47 +314,57 @@ opcode Machine::Code::decoder::fetch_opc + case COND : + _stack_depth -= 2; + if (_stack_depth <= 0) + failure(underfull_stack); + break; + case NEXT : + case NEXT_N : // runtime checked + case COPY_NEXT : +- test_context(); +- ++_pre_context; ++ ++_out_index; ++ if (_out_index < -1 || _out_index > _out_length || _slotref > _max.rule_length) ++ failure(out_of_range_data); + break; + case PUT_GLYPH_8BIT_OBS : + valid_upto(_max.classes, bc[0]); + test_context(); + break; + case PUT_SUBS_8BIT_OBS : +- valid_upto(_rule_length, _pre_context + int8(bc[0])); ++ test_ref(int8(bc[0])); + valid_upto(_max.classes, bc[1]); + valid_upto(_max.classes, bc[2]); + test_context(); + break; + case PUT_COPY : +- valid_upto(_rule_length, _pre_context + int8(bc[0])); ++ test_ref(int8(bc[0])); + test_context(); + break; + case INSERT : + if (_passtype >= PASS_TYPE_POSITIONING) + failure(invalid_opcode); +- else +- --_pre_context; ++ ++_out_length; ++ if (_out_index < 0) ++_out_index; ++ if (_out_index < -1 || _out_index >= _out_length) ++ failure(out_of_range_data); + break; + case DELETE : + if (_passtype >= PASS_TYPE_POSITIONING) + failure(invalid_opcode); +- test_context(); ++ if (_out_index < _max.pre_context) ++ failure(out_of_range_data); ++ --_out_index; ++ --_out_length; ++ if (_out_index < -1 || _out_index > _out_length) ++ failure(out_of_range_data); + break; + case ASSOC : ++ if (bc[0] == 0) ++ failure(out_of_range_data); + for (uint8 num = bc[0]; num; --num) +- valid_upto(_rule_length, _pre_context + int8(bc[num])); ++ test_ref(int8(bc[num])); + test_context(); + break; + case CNTXT_ITEM : + valid_upto(_max.rule_length, _max.pre_context + int8(bc[0])); + if (bc + 2 + bc[1] >= _max.bytecode) failure(jump_past_end); + if (_in_ctxt_item) failure(nested_context_item); + break; + case ATTR_SET : +@@ -378,52 +383,43 @@ opcode Machine::Code::decoder::fetch_opc + failure(underfull_stack); + if (valid_upto(gr_slatMax, bc[0])) + valid_upto(_max.attrid[bc[0]], bc[1]); + test_context(); + break; + case PUSH_SLOT_ATTR : + ++_stack_depth; + valid_upto(gr_slatMax, bc[0]); +- valid_upto(_rule_length, _pre_context + int8(bc[1])); ++ test_ref(int8(bc[1])); + if (attrCode(bc[0]) == gr_slatUserDefn) // use IATTR for user attributes + failure(out_of_range_data); + break; + case PUSH_GLYPH_ATTR_OBS : ++ case PUSH_ATT_TO_GATTR_OBS : + ++_stack_depth; + valid_upto(_max.glyf_attrs, bc[0]); +- valid_upto(_rule_length, _pre_context + int8(bc[1])); ++ test_ref(int8(bc[1])); + break; ++ case PUSH_ATT_TO_GLYPH_METRIC : + case PUSH_GLYPH_METRIC : + ++_stack_depth; + valid_upto(kgmetDescent, bc[0]); +- valid_upto(_rule_length, _pre_context + int8(bc[1])); ++ test_ref(int8(bc[1])); + // level: dp[2] no check necessary + break; + case PUSH_FEAT : + ++_stack_depth; + valid_upto(_max.features, bc[0]); +- valid_upto(_rule_length, _pre_context + int8(bc[1])); +- break; +- case PUSH_ATT_TO_GATTR_OBS : +- ++_stack_depth; +- valid_upto(_max.glyf_attrs, bc[0]); +- valid_upto(_rule_length, _pre_context + int8(bc[1])); +- break; +- case PUSH_ATT_TO_GLYPH_METRIC : +- ++_stack_depth; +- valid_upto(kgmetDescent, bc[0]); +- valid_upto(_rule_length, _pre_context + int8(bc[1])); +- // level: dp[2] no check necessary ++ test_ref(int8(bc[1])); + break; + case PUSH_ISLOT_ATTR : + ++_stack_depth; + if (valid_upto(gr_slatMax, bc[0])) + { +- valid_upto(_rule_length, _pre_context + int8(bc[1])); ++ test_ref(int8(bc[1])); + valid_upto(_max.attrid[bc[0]], bc[2]); + } + break; + case PUSH_IGLYPH_ATTR :// not implemented + ++_stack_depth; + break; + case POP_RET : + if (--_stack_depth < 0) +@@ -442,118 +438,107 @@ opcode Machine::Code::decoder::fetch_opc + valid_upto(_max.attrid[bc[0]], bc[1]); + test_context(); + break; + case PUSH_PROC_STATE : // dummy: dp[0] no check necessary + case PUSH_VERSION : + ++_stack_depth; + break; + case PUT_SUBS : +- valid_upto(_rule_length, _pre_context + int8(bc[0])); ++ test_ref(int8(bc[0])); + valid_upto(_max.classes, uint16(bc[1]<< 8) | bc[2]); + valid_upto(_max.classes, uint16(bc[3]<< 8) | bc[4]); + test_context(); + break; + case PUT_SUBS2 : // not implemented + case PUT_SUBS3 : // not implemented + break; + case PUT_GLYPH : + valid_upto(_max.classes, uint16(bc[0]<< 8) | bc[1]); + test_context(); + break; + case PUSH_GLYPH_ATTR : + case PUSH_ATT_TO_GLYPH_ATTR : + ++_stack_depth; + valid_upto(_max.glyf_attrs, uint16(bc[0]<< 8) | bc[1]); +- valid_upto(_rule_length, _pre_context + int8(bc[2])); ++ test_ref(int8(bc[2])); ++ break; ++ case SET_FEAT : ++ valid_upto(_max.features, bc[0]); ++ test_ref(int8(bc[1])); + break; + default: + failure(invalid_opcode); + break; + } + +- return bool(_code) ? opc : MAX_OPCODE; ++ return bool(_code) ? opcode(opc) : MAX_OPCODE; + } + + + void Machine::Code::decoder::analyse_opcode(const opcode opc, const int8 * arg) throw() + { +- if (_code._constraint) return; +- + switch (opc) + { + case DELETE : + _code._delete = true; + break; ++ case ASSOC : ++ set_changed(0); ++// for (uint8 num = arg[0]; num; --num) ++// _analysis.set_noref(num); ++ break; + case PUT_GLYPH_8BIT_OBS : + case PUT_GLYPH : + _code._modify = true; +- _analysis.set_changed(0); ++ set_changed(0); + break; + case ATTR_SET : + case ATTR_ADD : ++ case ATTR_SUB : + case ATTR_SET_SLOT : + case IATTR_SET_SLOT : + case IATTR_SET : + case IATTR_ADD : + case IATTR_SUB : +- _analysis.set_noref(0); ++ set_noref(0); + break; + case NEXT : + case COPY_NEXT : +- if (!_analysis.contexts[_analysis.slotref].flags.inserted) +- ++_analysis.slotref; +- _analysis.contexts[_analysis.slotref] = context(_code._instr_count+1); ++ ++_slotref; ++ _contexts[_slotref] = context(_code._instr_count+1); + // if (_analysis.slotref > _analysis.max_ref) _analysis.max_ref = _analysis.slotref; + break; + case INSERT : +- _analysis.contexts[_analysis.slotref].flags.inserted = true; ++ if (_slotref >= 0) --_slotref; + _code._modify = true; + break; + case PUT_SUBS_8BIT_OBS : // slotref on 1st parameter + case PUT_SUBS : + _code._modify = true; +- _analysis.set_changed(0); ++ set_changed(0); + GR_FALLTHROUGH; + // no break + case PUT_COPY : +- { +- if (arg[0] != 0) { _analysis.set_changed(0); _code._modify = true; } +- if (arg[0] <= 0 && -arg[0] <= _analysis.slotref - _analysis.contexts[_analysis.slotref].flags.inserted) +- _analysis.set_ref(arg[0], true); +- else if (arg[0] > 0) +- _analysis.set_ref(arg[0], true); ++ if (arg[0] != 0) { set_changed(0); _code._modify = true; } ++ set_ref(arg[0]); + break; +- } +- case PUSH_ATT_TO_GATTR_OBS : // slotref on 2nd parameter +- if (_code._constraint) return; +- GR_FALLTHROUGH; +- // no break + case PUSH_GLYPH_ATTR_OBS : + case PUSH_SLOT_ATTR : + case PUSH_GLYPH_METRIC : ++ case PUSH_ATT_TO_GATTR_OBS : + case PUSH_ATT_TO_GLYPH_METRIC : + case PUSH_ISLOT_ATTR : + case PUSH_FEAT : +- if (arg[1] <= 0 && -arg[1] <= _analysis.slotref - _analysis.contexts[_analysis.slotref].flags.inserted) +- _analysis.set_ref(arg[1], true); +- else if (arg[1] > 0) +- _analysis.set_ref(arg[1], true); ++ case SET_FEAT : ++ set_ref(arg[1]); + break; + case PUSH_ATT_TO_GLYPH_ATTR : +- if (_code._constraint) return; +- GR_FALLTHROUGH; +- // no break + case PUSH_GLYPH_ATTR : +- if (arg[2] <= 0 && -arg[2] <= _analysis.slotref - _analysis.contexts[_analysis.slotref].flags.inserted) +- _analysis.set_ref(arg[2], true); +- else if (arg[2] > 0) +- _analysis.set_ref(arg[2], true); +- break; +- case ASSOC : // slotrefs in varargs ++ set_ref(arg[2]); + break; + default: + break; + } + } + + + bool Machine::Code::decoder::emit_opcode(opcode opc, const byte * & bc) +@@ -579,81 +564,89 @@ bool Machine::Code::decoder::emit_opcode + _data += param_sz; + _code._data_size += param_sz; + } + + // recursively decode a context item so we can split the skip into + // instruction and data portions. + if (opc == CNTXT_ITEM) + { +- assert(_pre_context == 0); ++ assert(_out_index == 0); + _in_ctxt_item = true; +- _pre_context = _max.pre_context + int8(_data[-2]); +- _rule_length = _max.rule_length; ++ _out_index = _max.pre_context + int8(_data[-2]); ++ _slotref = int8(_data[-2]); ++ _out_length = _max.rule_length; + + const size_t ctxt_start = _code._instr_count; + byte & instr_skip = _data[-1]; + byte & data_skip = *_data++; + ++_code._data_size; + const byte *curr_end = _max.bytecode; + + if (load(bc, bc + instr_skip)) + { + bc += instr_skip; + data_skip = instr_skip - (_code._instr_count - ctxt_start); + instr_skip = _code._instr_count - ctxt_start; + _max.bytecode = curr_end; + +- _rule_length = 1; +- _pre_context = 0; ++ _out_length = 1; ++ _out_index = 0; ++ _slotref = 0; + _in_ctxt_item = false; + } + else + { +- _pre_context = 0; ++ _out_index = 0; ++ _slotref = 0; + return false; + } + } + + return bool(_code); + } + + + void Machine::Code::decoder::apply_analysis(instr * const code, instr * code_end) + { + // insert TEMP_COPY commands for slots that need them (that change and are referenced later) + int tempcount = 0; + if (_code._constraint) return; + + const instr temp_copy = Machine::getOpcodeTable()[TEMP_COPY].impl[0]; +- for (const context * c = _analysis.contexts, * const ce = c + _analysis.slotref; c != ce; ++c) ++ for (const context * c = _contexts, * const ce = c + _slotref; c < ce; ++c) + { + if (!c->flags.referenced || !c->flags.changed) continue; + + instr * const tip = code + c->codeRef + tempcount; + memmove(tip+1, tip, (code_end - tip) * sizeof(instr)); + *tip = temp_copy; + ++code_end; + ++tempcount; + _code._delete = true; + } + + _code._instr_count = code_end - code; + } + + + inline +-bool Machine::Code::decoder::validate_opcode(const opcode opc, const byte * const bc) ++bool Machine::Code::decoder::validate_opcode(const byte opc, const byte * const bc) + { + if (opc >= MAX_OPCODE) + { + failure(invalid_opcode); + return false; + } + const opcode_t & op = Machine::getOpcodeTable()[opc]; ++ if (op.impl[_code._constraint] == 0) ++ { ++ failure(unimplemented_opcode_used); ++ return false; ++ } + if (op.param_sz == VARARGS && bc >= _max.bytecode) + { + failure(arguments_exhausted); + return false; + } + const size_t param_sz = op.param_sz == VARARGS ? bc[0] + 1 : op.param_sz; + if (bc - 1 + param_sz >= _max.bytecode) + { +@@ -666,56 +659,69 @@ bool Machine::Code::decoder::validate_op + + bool Machine::Code::decoder::valid_upto(const uint16 limit, const uint16 x) const throw() + { + const bool t = (limit != 0) && (x < limit); + if (!t) failure(out_of_range_data); + return t; + } + ++inline ++bool Machine::Code::decoder::test_ref(int8 index) const throw() ++{ ++ if (_code._constraint && !_in_ctxt_item) ++ { ++ if (index > 0 || -index > _max.pre_context) ++ { ++ failure(out_of_range_data); ++ return false; ++ } ++ } ++ else ++ return valid_upto(_max.rule_length, _slotref + _max.pre_context + index); ++ return true; ++} ++ + bool Machine::Code::decoder::test_context() const throw() + { +- if (_pre_context >= _rule_length || _analysis.slotref >= analysis::NUMCONTEXTS - 1) ++ if (_out_index >= _out_length || _out_index < 0 || _slotref >= NUMCONTEXTS - 1) + { + failure(out_of_range_data); + return false; + } + return true; + } + + inline + void Machine::Code::failure(const status_t s) throw() { + release_buffers(); + _status = s; + } + + + inline +-void Machine::Code::decoder::analysis::set_ref(int index, bool incinsert) throw() { +- if (incinsert && contexts[slotref].flags.inserted) --index; +- if (index + slotref < 0 || index + slotref >= NUMCONTEXTS) return; +- contexts[index + slotref].flags.referenced = true; +- if ((index > 0 || !contexts[index + slotref].flags.inserted) && index + slotref > max_ref) max_ref = index + slotref; ++void Machine::Code::decoder::set_ref(int index) throw() { ++ if (index + _slotref < 0 || index + _slotref >= NUMCONTEXTS) return; ++ _contexts[index + _slotref].flags.referenced = true; ++ if (index + _slotref > _max_ref) _max_ref = index + _slotref; + } + + + inline +-void Machine::Code::decoder::analysis::set_noref(int index) throw() { +- if (contexts[slotref].flags.inserted) --index; +- if (index + slotref < 0 || index + slotref >= NUMCONTEXTS) return; +- if ((index > 0 || !contexts[index + slotref].flags.inserted) && index + slotref > max_ref) max_ref = index + slotref; ++void Machine::Code::decoder::set_noref(int index) throw() { ++ if (index + _slotref < 0 || index + _slotref >= NUMCONTEXTS) return; ++ if (index + _slotref > _max_ref) _max_ref = index + _slotref; + } + + + inline +-void Machine::Code::decoder::analysis::set_changed(int index) throw() { +- if (contexts[slotref].flags.inserted) --index; +- if (index + slotref < 0 || index + slotref >= NUMCONTEXTS) return; +- contexts[index + slotref].flags.changed = true; +- if ((index > 0 || !contexts[index + slotref].flags.inserted) && index + slotref > max_ref) max_ref = index + slotref; ++void Machine::Code::decoder::set_changed(int index) throw() { ++ if (index + _slotref < 0 || index + _slotref >= NUMCONTEXTS) return; ++ _contexts[index + _slotref].flags.changed= true; ++ if (index + _slotref > _max_ref) _max_ref = index + _slotref; + } + + + void Machine::Code::release_buffers() throw() + { + if (_own) + free(_code); + _code = 0; +diff --git a/gfx/graphite2/src/Collider.cpp b/gfx/graphite2/src/Collider.cpp +--- a/gfx/graphite2/src/Collider.cpp ++++ b/gfx/graphite2/src/Collider.cpp +@@ -21,17 +21,17 @@ + + Alternatively, the contents of this file may be used under the terms of the + Mozilla Public License (http://mozilla.org/MPL) or the GNU General Public + License, as published by the Free Software Foundation, either version 2 + of the License or (at your option) any later version. + */ + #include + #include +-#include ++#include + #include + #include + #include "inc/Collider.h" + #include "inc/Segment.h" + #include "inc/Slot.h" + #include "inc/GlyphCache.h" + #include "inc/Sparse.h" + +@@ -824,43 +824,43 @@ bool KernCollider::initSlot(Segment *seg + if (margin < 10) margin = 10; + + _limit = limit; + _offsetPrev = offsetPrev; // kern from a previous pass + + // Calculate the height of the glyph and how many horizontal slices to use. + if (_maxy >= 1e37f) + { +- _maxy = ymax; +- _miny = ymin; + _sliceWidth = margin / 1.5f; ++ _maxy = ymax + margin; ++ _miny = ymin - margin; + numSlices = int((_maxy - _miny + 2) / (_sliceWidth / 1.5f) + 1.f); // +2 helps with rounding errors + _edges.clear(); + _edges.insert(_edges.begin(), numSlices, (dir & 1) ? 1e38f : -1e38f); + _xbound = (dir & 1) ? (float)1e38f : (float)-1e38f; + } + else if (_maxy != ymax || _miny != ymin) + { + if (_miny != ymin) + { +- numSlices = int((ymin - _miny) / _sliceWidth - 1); ++ numSlices = int((ymin - margin - _miny) / _sliceWidth - 1); + _miny += numSlices * _sliceWidth; + if (numSlices < 0) + _edges.insert(_edges.begin(), -numSlices, (dir & 1) ? 1e38f : -1e38f); + else if ((unsigned)numSlices < _edges.size()) // this shouldn't fire since we always grow the range + { + Vector::iterator e = _edges.begin(); + while (numSlices--) + ++e; + _edges.erase(_edges.begin(), e); + } + } + if (_maxy != ymax) + { +- numSlices = int((ymax - _miny) / _sliceWidth + 1); ++ numSlices = int((ymax + margin - _miny) / _sliceWidth + 1); + _maxy = numSlices * _sliceWidth + _miny; + if (numSlices > (int)_edges.size()) + _edges.insert(_edges.end(), numSlices - _edges.size(), (dir & 1) ? 1e38f : -1e38f); + else if (numSlices < (int)_edges.size()) // this shouldn't fire since we always grow the range + { + while ((int)_edges.size() > numSlices) + _edges.pop_back(); + } +@@ -930,53 +930,60 @@ bool KernCollider::initSlot(Segment *seg + // Return false if we know there is no collision, true if we think there might be one. + bool KernCollider::mergeSlot(Segment *seg, Slot *slot, const Position &currShift, float currSpace, int dir, GR_MAYBE_UNUSED json * const dbgout) + { + int rtl = (dir & 1) * 2 - 1; + if (!seg->getFace()->glyphs().check(slot->gid())) + return false; + const Rect &bb = seg->theGlyphBBoxTemporary(slot->gid()); + const float sx = slot->origin().x + currShift.x; +- float x = sx + (rtl > 0 ? bb.tr.x : bb.bl.x); ++ float x = (sx + (rtl > 0 ? bb.tr.x : bb.bl.x)) * rtl; + // this isn't going to reduce _mingap so skip +- if ((rtl > 0 && x < _xbound - _mingap - currSpace) || (rtl <= 0 && x > _xbound + _mingap + currSpace)) ++ if (x < rtl * (_xbound - _mingap - currSpace)) + return false; + + const float sy = slot->origin().y + currShift.y; +- int smin = max(0, int((bb.bl.y + (1 - _miny + sy)) / _sliceWidth + 1)); +- int smax = min((int)_edges.size() - 1, int((bb.tr.y + (1 - _miny + sy)) / _sliceWidth + 1)); ++ int smin = max(1, int((bb.bl.y + (1 - _miny + sy)) / _sliceWidth + 1)) - 1; ++ int smax = min((int)_edges.size() - 2, int((bb.tr.y + (1 - _miny + sy)) / _sliceWidth + 1)) + 1; ++ if (smin > smax) ++ return false; + bool collides = false; ++ float below = smin > 0 ? _edges[smin-1] * rtl : 1e38f; ++ float here = _edges[smin] * rtl; ++ float above = smin < (int)_edges.size() - 1 ? _edges[smin+1] * rtl : 1e38f; + + for (int i = smin; i <= smax; ++i) + { + float t; + float y = (float)(_miny - 1 + (i + .5f) * _sliceWidth); // vertical center of slice +- if (x * rtl > _edges[i] * rtl - _mingap - currSpace) ++ if ( (x > here - _mingap - currSpace) ++ || (x > below - _mingap - currSpace) ++ || (x > above - _mingap - currSpace)) + { + // 2 * currSpace to account for the space that is already separating them and the space we want to add +- float m = get_edge(seg, slot, currShift, y, _sliceWidth, rtl > 0) + 2 * rtl * currSpace; +- t = rtl * (_edges[i] - m); ++ float m = get_edge(seg, slot, currShift, y, _sliceWidth, rtl > 0) * rtl + 2 * currSpace; + // Check slices above and below (if any). +- if (i < (int)_edges.size() - 1) t = min(t, rtl * (_edges[i+1] - m)); +- if (i > 0) t = min(t, rtl * (_edges[i-1] - m)); ++ t = min(min(here, below), above) - m; + // _mingap is positive to shrink + if (t < _mingap) + { + _mingap = t; + collides = true; + } + #if !defined GRAPHITE2_NTRACING + // Debugging - remember the closest neighboring edge for this slice. +- if (rtl * m > rtl * _nearEdges[i]) ++ if (m > rtl * _nearEdges[i]) + { + _slotNear[i] = slot; +- _nearEdges[i] = m; ++ _nearEdges[i] = m * rtl; + } + #endif + } ++ below = here; here = above; ++ above = i < (int)_edges.size() - 2 ? _edges[i+2] * rtl : 1e38f; + } + return collides; // note that true is not a necessarily reliable value + + } // end of KernCollider::mergeSlot + + + // Return the amount to kern by. + Position KernCollider::resolve(GR_MAYBE_UNUSED Segment *seg, GR_MAYBE_UNUSED Slot *slot, +diff --git a/gfx/graphite2/src/Face.cpp b/gfx/graphite2/src/Face.cpp +--- a/gfx/graphite2/src/Face.cpp ++++ b/gfx/graphite2/src/Face.cpp +@@ -178,17 +178,18 @@ bool Face::runGraphite(Segment *seg, con + if ((seg->dir() & 3) == 3 && aSilf->bidiPass() == 0xFF) + seg->doMirror(aSilf->aMirror()); + bool res = aSilf->runGraphite(seg, 0, aSilf->positionPass(), true); + if (res) + { + seg->associateChars(0, seg->charInfoCount()); + if (aSilf->flags() & 0x20) + res &= seg->initCollisions(); +- res &= aSilf->runGraphite(seg, aSilf->positionPass(), aSilf->numPasses(), false); ++ if (res) ++ res &= aSilf->runGraphite(seg, aSilf->positionPass(), aSilf->numPasses(), false); + } + + #if !defined GRAPHITE2_NTRACING + if (dbgout) + { + seg->positionSlots(0, 0, 0, aSilf->dir()); + *dbgout << json::item + << json::close // Close up the passes array +@@ -226,17 +227,17 @@ const Silf *Face::chooseSilf(uint32 scri + return m_silfs; + } + + uint16 Face::findPseudo(uint32 uid) const + { + return (m_numSilf) ? m_silfs[0].findPseudo(uid) : 0; + } + +-uint16 Face::getGlyphMetric(uint16 gid, uint8 metric) const ++int32 Face::getGlyphMetric(uint16 gid, uint8 metric) const + { + switch (metrics(metric)) + { + case kgmetAscent : return m_ascent; + case kgmetDescent : return m_descent; + default: + if (gid >= glyphs().numGlyphs()) return 0; + return glyphs().glyph(gid)->getMetric(metric); +@@ -277,17 +278,17 @@ Face::Table::Table(const Face & face, co + : _f(&face), _compressed(false) + { + size_t sz = 0; + _p = static_cast((*_f->m_ops.get_table)(_f->m_appFaceHandle, n, &sz)); + _sz = uint32(sz); + + if (!TtfUtil::CheckTable(n, _p, _sz)) + { +- this->~Table(); // Make sure we release the table buffer even if the table filed it's checks ++ releaseBuffers(); // Make sure we release the table buffer even if the table failed it's checks + return; + } + + if (be::peek(_p) >= version) + decompress(); + } + + void Face::Table::releaseBuffers() +@@ -324,17 +325,18 @@ Error Face::Table::decompress() + switch(compression(hdr >> 27)) + { + case NONE: return e; + + case LZ4: + { + uncompressed_size = hdr & 0x07ffffff; + uncompressed_table = gralloc(uncompressed_size); +- if (!e.test(!uncompressed_table, E_OUTOFMEM)) ++ if (!e.test(!uncompressed_table || uncompressed_size < 4, E_OUTOFMEM)) ++ memset(uncompressed_table, 0, 4); // make sure version number is initialised + // coverity[forward_null : FALSE] - uncompressed_table has been checked so can't be null + // coverity[checked_return : FALSE] - we test e later + e.test(lz4::decompress(p, _sz - 2*sizeof(uint32), uncompressed_table, uncompressed_size) != signed(uncompressed_size), E_SHRINKERFAILED); + break; + } + + default: + e.error(E_BADSCHEME); +diff --git a/gfx/graphite2/src/GlyphCache.cpp b/gfx/graphite2/src/GlyphCache.cpp +--- a/gfx/graphite2/src/GlyphCache.cpp ++++ b/gfx/graphite2/src/GlyphCache.cpp +@@ -111,18 +111,20 @@ private: + _num_glyphs_attributes, + _num_attrs; // number of glyph attributes per glyph + }; + + + + GlyphCache::GlyphCache(const Face & face, const uint32 face_options) + : _glyph_loader(new Loader(face, bool(face_options & gr_face_dumbRendering))), +- _glyphs(_glyph_loader && *_glyph_loader ? grzeroalloc(_glyph_loader->num_glyphs()) : 0), +- _boxes(_glyph_loader && _glyph_loader->has_boxes() ? grzeroalloc(_glyph_loader->num_glyphs()) : 0), ++ _glyphs(_glyph_loader && *_glyph_loader && _glyph_loader->num_glyphs() ++ ? grzeroalloc(_glyph_loader->num_glyphs()) : 0), ++ _boxes(_glyph_loader && _glyph_loader->has_boxes() && _glyph_loader->num_glyphs() ++ ? grzeroalloc(_glyph_loader->num_glyphs()) : 0), + _num_glyphs(_glyphs ? _glyph_loader->num_glyphs() : 0), + _num_attrs(_glyphs ? _glyph_loader->num_attrs() : 0), + _upem(_glyphs ? _glyph_loader->units_per_em() : 0) + { + if ((face_options & gr_face_preloadGlyphs) && _glyph_loader && _glyphs) + { + int numsubs = 0; + GlyphFace * const glyphs = new GlyphFace [_num_glyphs]; +@@ -139,17 +141,17 @@ GlyphCache::GlyphCache(const Face & face + for (uint16 gid = 1; loaded && gid != _num_glyphs; ++gid) + _glyphs[gid] = loaded = _glyph_loader->read_glyph(gid, glyphs[gid], &numsubs); + + if (!loaded) + { + _glyphs[0] = 0; + delete [] glyphs; + } +- else if (numsubs > 0) ++ else if (numsubs > 0 && _boxes) + { + GlyphBox * boxes = (GlyphBox *)gralloc(_num_glyphs * sizeof(GlyphBox) + numsubs * 8 * sizeof(float)); + GlyphBox * currbox = boxes; + + for (uint16 gid = 0; currbox && gid != _num_glyphs; ++gid) + { + _boxes[gid] = currbox; + currbox = _glyph_loader->read_box(gid, currbox, *_glyphs[gid]); +@@ -204,16 +206,18 @@ GlyphCache::~GlyphCache() + free(_boxes[0]); + free(_boxes); + } + delete _glyph_loader; + } + + const GlyphFace *GlyphCache::glyph(unsigned short glyphid) const //result may be changed by subsequent call with a different glyphid + { ++ if (glyphid >= numGlyphs()) ++ return _glyphs[0]; + const GlyphFace * & p = _glyphs[glyphid]; + if (p == 0 && _glyph_loader) + { + int numsubs = 0; + GlyphFace * g = new GlyphFace(); + if (g) p = _glyph_loader->read_glyph(glyphid, *g, &numsubs); + if (!p) + { +@@ -280,26 +284,27 @@ GlyphCache::Loader::Loader(const Face & + _long_fmt = flags & 1; + int tmpnumgattrs = (m_pGloc.size() + - (p - m_pGloc) + - sizeof(uint16)*(flags & 0x2 ? _num_attrs : 0)) + / (_long_fmt ? sizeof(uint32) : sizeof(uint16)) - 1; + + if (version >= 0x00020000 || tmpnumgattrs < 0 || tmpnumgattrs > 65535 + || _num_attrs == 0 || _num_attrs > 0x3000 // is this hard limit appropriate? +- || _num_glyphs_graphics > tmpnumgattrs) ++ || _num_glyphs_graphics > tmpnumgattrs ++ || m_pGlat.size() < 4) + { + _head = Face::Table(); + return; + } + + _num_glyphs_attributes = static_cast(tmpnumgattrs); + p = m_pGlat; + version = be::read(p); +- if (version >= 0x00040000) // reject Glat tables that are too new ++ if (version >= 0x00040000 || (version >= 0x00030000 && m_pGlat.size() < 8)) // reject Glat tables that are too new + { + _head = Face::Table(); + return; + } + else if (version >= 0x00030000) + { + unsigned int glatflags = be::read(p); + _has_boxes = glatflags & 1; +@@ -381,22 +386,24 @@ const GlyphFace * GlyphCache::Loader::re + } + else + { + be::skip(gloc, glyphid); + glocs = be::read(gloc); + gloce = be::peek(gloc); + } + +- if (glocs >= m_pGlat.size() || gloce > m_pGlat.size()) ++ if (glocs >= m_pGlat.size() - 1 || gloce > m_pGlat.size()) + return 0; + + const uint32 glat_version = be::peek(m_pGlat); +- if (glat_version == 0x00030000) ++ if (glat_version >= 0x00030000) + { ++ if (glocs >= gloce) ++ return 0; + const byte * p = m_pGlat + glocs; + uint16 bmap = be::read(p); + int num = bit_set_count((uint32)bmap); + if (numsubs) *numsubs += num; + glocs += 6 + 8 * num; + if (glocs > gloce) + return 0; + } +@@ -449,29 +456,31 @@ GlyphBox * GlyphCache::Loader::read_box( + } + else + { + be::skip(gloc, gid); + glocs = be::read(gloc); + gloce = be::peek(gloc); + } + +- if (glocs >= m_pGlat.size() || gloce > m_pGlat.size()) ++ if (gloce > m_pGlat.size() || glocs + 6 >= gloce) + return 0; + + const byte * p = m_pGlat + glocs; + uint16 bmap = be::read(p); + int num = bit_set_count((uint32)bmap); + + Rect bbox = glyph.theBBox(); + Rect diamax(Position(bbox.bl.x + bbox.bl.y, bbox.bl.x - bbox.tr.y), + Position(bbox.tr.x + bbox.tr.y, bbox.tr.x - bbox.bl.y)); + Rect diabound = readbox(diamax, p[0], p[2], p[1], p[3]); + ::new (curr) GlyphBox(num, bmap, &diabound); + be::skip(p, 4); ++ if (glocs + 6 + num * 8 >= gloce) ++ return 0; + + for (int i = 0; i < num * 2; ++i) + { + Rect box = readbox((i & 1) ? diamax : bbox, p[0], p[2], p[1], p[3]); + curr->addSubBox(i >> 1, i & 1, &box); + be::skip(p, 4); + } + return (GlyphBox *)((char *)(curr) + sizeof(GlyphBox) + 2 * num * sizeof(Rect)); +diff --git a/gfx/graphite2/src/GlyphFace.cpp b/gfx/graphite2/src/GlyphFace.cpp +--- a/gfx/graphite2/src/GlyphFace.cpp ++++ b/gfx/graphite2/src/GlyphFace.cpp +@@ -24,25 +24,25 @@ Mozilla Public License (http://mozilla.o + License, as published by the Free Software Foundation, either version 2 + of the License or (at your option) any later version. + */ + #include "inc/GlyphFace.h" + + + using namespace graphite2; + +-uint16 GlyphFace::getMetric(uint8 metric) const ++int32 GlyphFace::getMetric(uint8 metric) const + { + switch (metrics(metric)) + { +- case kgmetLsb : return static_cast(m_bbox.bl.x); +- case kgmetRsb : return static_cast(m_advance.x - m_bbox.tr.x); +- case kgmetBbTop : return static_cast(m_bbox.tr.y); +- case kgmetBbBottom : return static_cast(m_bbox.bl.y); +- case kgmetBbLeft : return static_cast(m_bbox.bl.x); +- case kgmetBbRight : return static_cast(m_bbox.tr.x); +- case kgmetBbHeight : return static_cast(m_bbox.tr.y - m_bbox.bl.y); +- case kgmetBbWidth : return static_cast(m_bbox.tr.x - m_bbox.bl.x); +- case kgmetAdvWidth : return static_cast(m_advance.x); +- case kgmetAdvHeight : return static_cast(m_advance.y); ++ case kgmetLsb : return m_bbox.bl.x; ++ case kgmetRsb : return m_advance.x - m_bbox.tr.x; ++ case kgmetBbTop : return m_bbox.tr.y; ++ case kgmetBbBottom : return m_bbox.bl.y; ++ case kgmetBbLeft : return m_bbox.bl.x; ++ case kgmetBbRight : return m_bbox.tr.x; ++ case kgmetBbHeight : return m_bbox.tr.y - m_bbox.bl.y; ++ case kgmetBbWidth : return m_bbox.tr.x - m_bbox.bl.x; ++ case kgmetAdvWidth : return m_advance.x; ++ case kgmetAdvHeight : return m_advance.y; + default : return 0; + } + } +diff --git a/gfx/graphite2/src/Justifier.cpp b/gfx/graphite2/src/Justifier.cpp +--- a/gfx/graphite2/src/Justifier.cpp ++++ b/gfx/graphite2/src/Justifier.cpp +@@ -95,62 +95,63 @@ float Segment::justify(Slot *pSlot, cons + + end = pLast->nextSibling(); + pFirst = pFirst->nextSibling(); + + int icount = 0; + int numLevels = silf()->numJustLevels(); + if (!numLevels) + { +- for (s = pSlot; s != end; s = s->next()) ++ for (s = pSlot; s && s != end; s = s->nextSibling()) + { + CharInfo *c = charinfo(s->before()); + if (isWhitespace(c->unicodeChar())) + { + s->setJustify(this, 0, 3, 1); + s->setJustify(this, 0, 2, 1); + s->setJustify(this, 0, 0, -1); + ++icount; + } + } + if (!icount) + { +- for (s = pSlot; s != end; s = s->nextSibling()) ++ for (s = pSlot; s && s != end; s = s->nextSibling()) + { + s->setJustify(this, 0, 3, 1); + s->setJustify(this, 0, 2, 1); + s->setJustify(this, 0, 0, -1); + } + } + ++numLevels; + } + + Vector stats(numLevels); +- for (s = pFirst; s != end; s = s->nextSibling()) ++ for (s = pFirst; s && s != end; s = s->nextSibling()) + { + float w = s->origin().x / scale + s->advance() - base; + if (w > currWidth) currWidth = w; + for (int j = 0; j < numLevels; ++j) + stats[j].accumulate(s, this, j); + s->just(0); + } + + for (int i = (width < 0.0f) ? -1 : numLevels - 1; i >= 0; --i) + { + float diff; + float error = 0.; + float diffpw; + int tWeight = stats[i].weight(); ++ if (tWeight == 0) continue; + + do { + error = 0.; + diff = width - currWidth; + diffpw = diff / tWeight; + tWeight = 0; +- for (s = pFirst; s != end; s = s->nextSibling()) // don't include final glyph ++ for (s = pFirst; s && s != end; s = s->nextSibling()) // don't include final glyph + { + int w = s->getJustify(this, i, 3); + float pref = diffpw * w + error; + int step = s->getJustify(this, i, 2); + if (!step) step = 1; // handle lazy font developers + if (pref > 0) + { + float max = uint16(s->getJustify(this, i, 0)); +diff --git a/gfx/graphite2/src/NameTable.cpp b/gfx/graphite2/src/NameTable.cpp +--- a/gfx/graphite2/src/NameTable.cpp ++++ b/gfx/graphite2/src/NameTable.cpp +@@ -42,25 +42,26 @@ NameTable::NameTable(const void* data, s + memcpy(pdata, data, length); + m_table = reinterpret_cast(pdata); + + if ((length > sizeof(TtfUtil::Sfnt::FontNames)) && + (length > sizeof(TtfUtil::Sfnt::FontNames) + + sizeof(TtfUtil::Sfnt::NameRecord) * ( be::swap(m_table->count) - 1))) + { + uint16 offset = be::swap(m_table->string_offset); +- m_nameData = reinterpret_cast(pdata) + offset; +- setPlatformEncoding(platformId, encodingID); +- m_nameDataLength = length - offset; ++ if (offset < length) ++ { ++ m_nameData = reinterpret_cast(pdata) + offset; ++ setPlatformEncoding(platformId, encodingID); ++ m_nameDataLength = length - offset; ++ return; ++ } + } +- else +- { +- free(const_cast(m_table)); +- m_table = NULL; +- } ++ free(const_cast(m_table)); ++ m_table = NULL; + } + + uint16 NameTable::setPlatformEncoding(uint16 platformId, uint16 encodingID) + { + if (!m_nameData) return 0; + uint16 i = 0; + uint16 count = be::swap(m_table->count); + for (; i < count; i++) +@@ -139,28 +140,36 @@ void* NameTable::getName(uint16& languag + uint16 offset = be::swap(nameRecord.offset); + if(offset + utf16Length > m_nameDataLength) + { + languageId = 0; + length = 0; + return NULL; + } + utf16Length >>= 1; // in utf16 units +- utf16::codeunit_t * utf16Name = gralloc(utf16Length); ++ utf16::codeunit_t * utf16Name = gralloc(utf16Length + 1); + if (!utf16Name) + { + languageId = 0; + length = 0; + return NULL; + } + const uint8* pName = m_nameData + offset; + for (size_t i = 0; i < utf16Length; i++) + { + utf16Name[i] = be::read(pName); + } ++ utf16Name[utf16Length] = 0; ++ if (!utf16::validate(utf16Name, utf16Name + utf16Length)) ++ { ++ free(utf16Name); ++ languageId = 0; ++ length = 0; ++ return NULL; ++ } + switch (enc) + { + case gr_utf8: + { + utf8::codeunit_t* uniBuffer = gralloc(3 * utf16Length + 1); + if (!uniBuffer) + { + free(utf16Name); +diff --git a/gfx/graphite2/src/Pass.cpp b/gfx/graphite2/src/Pass.cpp +--- a/gfx/graphite2/src/Pass.cpp ++++ b/gfx/graphite2/src/Pass.cpp +@@ -96,17 +96,17 @@ bool Pass::readPass(const byte * const p + const byte * p = pass_start, + * const pass_end = p + pass_length; + size_t numRanges; + + if (e.test(pass_length < 40, E_BADPASSLENGTH)) return face.error(e); + // Read in basic values + const byte flags = be::read(p); + if (e.test((flags & 0x1f) && +- (pt < PASS_TYPE_POSITIONING || !m_silf->aCollision() || !face.glyphs().hasBoxes()), ++ (pt < PASS_TYPE_POSITIONING || !m_silf->aCollision() || !face.glyphs().hasBoxes() || !(m_silf->flags() & 0x20)), + E_BADCOLLISIONPASS)) + return face.error(e); + m_numCollRuns = flags & 0x7; + m_kernColls = (flags >> 3) & 0x3; + m_isReverseDir = (flags >> 5) & 0x1; + m_iMaxLoop = be::read(p); + if (m_iMaxLoop < 1) m_iMaxLoop = 1; + be::skip(p,2); // skip maxContext & maxBackup +@@ -226,17 +226,21 @@ bool Pass::readRules(const byte * rule_m + // Load rules. + const byte * ac_begin = 0, * rc_begin = 0, + * ac_end = ac_data + be::peek(o_action), + * rc_end = rc_data + be::peek(o_constraint); + + // Allocate pools + m_rules = new Rule [m_numRules]; + m_codes = new Code [m_numRules*2]; +- const size_t prog_pool_sz = vm::Machine::Code::estimateCodeDataOut(ac_end - ac_data + rc_end - rc_data); ++ int totalSlots = 0; ++ const uint16 *tsort = sort_key; ++ for (int i = 0; i < m_numRules; ++i) ++ totalSlots += be::peek(--tsort); ++ const size_t prog_pool_sz = vm::Machine::Code::estimateCodeDataOut(ac_end - ac_data + rc_end - rc_data, 2 * m_numRules, totalSlots); + m_progs = gralloc(prog_pool_sz); + byte * prog_pool_free = m_progs, + * prog_pool_end = m_progs + prog_pool_sz; + if (e.test(!(m_rules && m_codes && m_progs), E_OUTOFMEM)) return face.error(e); + + Rule * r = m_rules + m_numRules - 1; + for (size_t n = m_numRules; r >= m_rules; --n, --r, ac_end = ac_begin, rc_end = rc_begin) + { +@@ -249,17 +253,17 @@ bool Pass::readRules(const byte * rule_m + if (r->sort > 63 || r->preContext >= r->sort || r->preContext > m_maxPreCtxt || r->preContext < m_minPreCtxt) + return false; + ac_begin = ac_data + be::peek(--o_action); + --o_constraint; + rc_begin = be::peek(o_constraint) ? rc_data + be::peek(o_constraint) : rc_end; + + if (ac_begin > ac_end || ac_begin > ac_data_end || ac_end > ac_data_end + || rc_begin > rc_end || rc_begin > rc_data_end || rc_end > rc_data_end +- || vm::Machine::Code::estimateCodeDataOut(ac_end - ac_begin + rc_end - rc_begin) > size_t(prog_pool_end - prog_pool_free)) ++ || vm::Machine::Code::estimateCodeDataOut(ac_end - ac_begin + rc_end - rc_begin, 2, r->sort) > size_t(prog_pool_end - prog_pool_free)) + return false; + r->action = new (m_codes+n*2-2) vm::Machine::Code(false, ac_begin, ac_end, r->preContext, r->sort, *m_silf, face, pt, &prog_pool_free); + r->constraint = new (m_codes+n*2-1) vm::Machine::Code(true, rc_begin, rc_end, r->preContext, r->sort, *m_silf, face, pt, &prog_pool_free); + + if (e.test(!r->action || !r->constraint, E_OUTOFMEM) + || e.test(r->action->status() != Code::loaded, r->action->status() + E_CODEFAILURE) + || e.test(r->constraint->status() != Code::loaded, r->constraint->status() + E_CODEFAILURE) + || e.test(!r->constraint->immutable(), E_MUTABLECCODE)) +@@ -330,17 +334,17 @@ bool Pass::readStates(const byte * start + + // load state transition table. + for (uint16 * t = m_transitions, + * const t_end = t + m_numTransition*m_numColumns; t != t_end; ++t) + { + *t = be::read(states); + if (e.test(*t >= m_numStates, E_BADSTATE)) + { +- face.error_context((face.error_context() & 0xFFFF00) + EC_ATRANS + (((t - m_transitions) / m_numColumns) << 24)); ++ face.error_context((face.error_context() & 0xFFFF00) + EC_ATRANS + (((t - m_transitions) / m_numColumns) << 8)); + return face.error(e); + } + } + + State * s = m_states, + * const success_begin = m_states + m_numStates - m_numSuccess; + const RuleEntry * rule_map_end = m_ruleMap + be::peek(o_rule_map + m_numSuccess*sizeof(uint16)); + for (size_t n = m_numStates; n; --n, ++s) +@@ -351,17 +355,18 @@ bool Pass::readStates(const byte * start + if (e.test(begin >= rule_map_end || end > rule_map_end || begin > end, E_BADRULEMAPPING)) + { + face.error_context((face.error_context() & 0xFFFF00) + EC_ARULEMAP + (n << 24)); + return face.error(e); + } + s->rules = begin; + s->rules_end = (end - begin <= FiniteStateMachine::MAX_RULES)? end : + begin + FiniteStateMachine::MAX_RULES; +- qsort(begin, end - begin, sizeof(RuleEntry), &cmpRuleEntry); ++ if (begin) // keep UBSan happy can't call qsort with null begin ++ qsort(begin, end - begin, sizeof(RuleEntry), &cmpRuleEntry); + } + + return true; + } + + bool Pass::readRanges(const byte * ranges, size_t num_ranges, Error &e) + { + m_cols = gralloc(m_numGlyphs); +@@ -449,19 +454,19 @@ bool Pass::runFSM(FiniteStateMachine& fs + if (fsm.slots.context() < m_minPreCtxt) + return false; + + uint16 state = m_startStates[m_maxPreCtxt - fsm.slots.context()]; + uint8 free_slots = SlotMap::MAX_SLOTS; + do + { + fsm.slots.pushSlot(slot); +- if (--free_slots == 0 +- || slot->gid() >= m_numGlyphs ++ if (slot->gid() >= m_numGlyphs + || m_cols[slot->gid()] == 0xffffU ++ || --free_slots == 0 + || state >= m_numTransition) + return free_slots != 0; + + const uint16 * transitions = m_transitions + state*m_numColumns; + state = transitions[m_cols[slot->gid()]]; + if (state >= m_successStart) + fsm.rules.accumulate_rules(m_states[state]); + +@@ -627,37 +632,40 @@ bool Pass::testPassConstraint(Machine & + } + + + bool Pass::testConstraint(const Rule & r, Machine & m) const + { + const uint16 curr_context = m.slotMap().context(); + if (unsigned(r.sort - r.preContext) > m.slotMap().size() - curr_context + || curr_context - r.preContext < 0) return false; ++ ++ vm::slotref * map = m.slotMap().begin() + curr_context - r.preContext; ++ if (map[r.sort - 1] == 0) ++ return false; ++ + if (!*r.constraint) return true; + assert(r.constraint->constraint()); +- +- vm::slotref * map = m.slotMap().begin() + curr_context - r.preContext; + for (int n = r.sort; n && map; --n, ++map) + { + if (!*map) continue; + const int32 ret = r.constraint->run(m, map); + if (!ret || m.status() != Machine::finished) + return false; + } + + return true; + } + + + void SlotMap::collectGarbage(Slot * &aSlot) + { + for(Slot **s = begin(), *const *const se = end() - 1; s != se; ++s) { + Slot *& slot = *s; +- if(slot->isDeleted() || slot->isCopied()) ++ if(slot && (slot->isDeleted() || slot->isCopied())) + { + if (slot == aSlot) + aSlot = slot->prev() ? slot->prev() : slot->next(); + segment.freeSlot(slot); + } + } + } + +@@ -848,17 +856,16 @@ bool Pass::collisionShift(Segment *seg, + } + } + } + return true; + } + + bool Pass::collisionKern(Segment *seg, int dir, json * const dbgout) const + { +- KernCollider kerncoll(dbgout); + Slot *start = seg->first(); + float ymin = 1e38f; + float ymax = -1e38f; + const GlyphCache &gc = seg->getFace()->glyphs(); + + // phase 3 : handle kerning of clusters + #if !defined GRAPHITE2_NTRACING + if (dbgout) +@@ -871,17 +878,17 @@ bool Pass::collisionKern(Segment *seg, i + return false; + const SlotCollision * c = seg->collisionInfo(s); + const Rect &bbox = seg->theGlyphBBoxTemporary(s->gid()); + float y = s->origin().y + c->shift().y; + ymax = max(y + bbox.tr.y, ymax); + ymin = min(y + bbox.bl.y, ymin); + if (start && (c->flags() & (SlotCollision::COLL_KERN | SlotCollision::COLL_FIX)) + == (SlotCollision::COLL_KERN | SlotCollision::COLL_FIX)) +- resolveKern(seg, s, start, kerncoll, dir, ymin, ymax, dbgout); ++ resolveKern(seg, s, start, dir, ymin, ymax, dbgout); + if (c->flags() & SlotCollision::COLL_END) + start = NULL; + if (c->flags() & SlotCollision::COLL_START) + start = s; + } + + #if !defined GRAPHITE2_NTRACING + if (dbgout) +@@ -1010,17 +1017,17 @@ bool Pass::resolveCollisions(Segment *se + if (isCol) + { cFix->setFlags(cFix->flags() | SlotCollision::COLL_ISCOL | SlotCollision::COLL_KNOWN); } + else + { cFix->setFlags((cFix->flags() & ~SlotCollision::COLL_ISCOL) | SlotCollision::COLL_KNOWN); } + hasCol |= isCol; + return true; + } + +-float Pass::resolveKern(Segment *seg, Slot *slotFix, GR_MAYBE_UNUSED Slot *start, KernCollider &coll, int dir, ++float Pass::resolveKern(Segment *seg, Slot *slotFix, GR_MAYBE_UNUSED Slot *start, int dir, + float &ymin, float &ymax, json *const dbgout) const + { + Slot *nbor; // neighboring slot + float currSpace = 0.; + bool collides = false; + unsigned int space_count = 0; + Slot *base = slotFix; + while (base->attachedTo()) +@@ -1030,16 +1037,17 @@ float Pass::resolveKern(Segment *seg, Sl + + if (base != slotFix) + { + cFix->setFlags(cFix->flags() | SlotCollision::COLL_KERN | SlotCollision::COLL_FIX); + return 0; + } + bool seenEnd = (cFix->flags() & SlotCollision::COLL_END) != 0; + bool isInit = false; ++ KernCollider coll(dbgout); + + for (nbor = slotFix->next(); nbor; nbor = nbor->next()) + { + if (nbor->isChildOf(base)) + continue; + if (!gc.check(nbor->gid())) + return 0.; + const Rect &bb = seg->theGlyphBBoxTemporary(nbor->gid()); +diff --git a/gfx/graphite2/src/Segment.cpp b/gfx/graphite2/src/Segment.cpp +--- a/gfx/graphite2/src/Segment.cpp ++++ b/gfx/graphite2/src/Segment.cpp +@@ -419,16 +419,19 @@ Position Segment::positionSlots(const Fo + reverseSlots(); + temp = iStart; + iStart = iEnd; + iEnd = temp; + } + if (!iStart) iStart = m_first; + if (!iEnd) iEnd = m_last; + ++ if (!iStart || !iEnd) // only true for empty segments ++ return currpos; ++ + if (isRtl) + { + for (Slot * s = iEnd, * const end = iStart->prev(); s && s != end; s = s->prev()) + { + if (s->isBase()) + currpos = s->finalise(this, font, currpos, bbox, 0, clusterMin = currpos.x, isRtl, isFinal); + } + } +@@ -526,11 +529,14 @@ void Segment::doMirror(uint16 aMirror) + } + + bool Segment::initCollisions() + { + m_collisions = grzeroalloc(slotCount()); + if (!m_collisions) return false; + + for (Slot *p = m_first; p; p = p->next()) +- ::new (collisionInfo(p)) SlotCollision(this, p); ++ if (p->index() < slotCount()) ++ ::new (collisionInfo(p)) SlotCollision(this, p); ++ else ++ return false; + return true; + } +diff --git a/gfx/graphite2/src/Silf.cpp b/gfx/graphite2/src/Silf.cpp +--- a/gfx/graphite2/src/Silf.cpp ++++ b/gfx/graphite2/src/Silf.cpp +@@ -350,20 +350,20 @@ uint16 Silf::getClassGlyph(uint16 cid, u + } + return 0; + } + + + bool Silf::runGraphite(Segment *seg, uint8 firstPass, uint8 lastPass, int dobidi) const + { + assert(seg != 0); +- SlotMap map(*seg, m_dir); ++ unsigned int maxSize = seg->slotCount() * MAX_SEG_GROWTH_FACTOR; ++ SlotMap map(*seg, m_dir, maxSize); + FiniteStateMachine fsm(map, seg->getFace()->logger()); + vm::Machine m(map); +- unsigned int initSize = seg->slotCount(); + uint8 lbidi = m_bPass; + #if !defined GRAPHITE2_NTRACING + json * const dbgout = seg->getFace()->logger(); + #endif + + if (lastPass == 0) + { + if (firstPass == lastPass && lbidi == 0xFF) +@@ -419,13 +419,13 @@ bool Silf::runGraphite(Segment *seg, uin + + // test whether to reorder, prepare for positioning + bool reverse = (lbidi == 0xFF) && (seg->currdir() != ((m_dir & 1) ^ m_passes[i].reverseDir())); + if ((i >= 32 || (seg->passBits() & (1 << i)) == 0 || m_passes[i].collisionLoops()) + && !m_passes[i].runGraphite(m, fsm, reverse)) + return false; + // only subsitution passes can change segment length, cached subsegments are short for their text + if (m.status() != vm::Machine::finished +- || (seg->slotCount() && seg->slotCount() * MAX_SEG_GROWTH_FACTOR < initSize)) ++ || (seg->slotCount() && seg->slotCount() > maxSize)) + return false; + } + return true; + } +diff --git a/gfx/graphite2/src/Slot.cpp b/gfx/graphite2/src/Slot.cpp +--- a/gfx/graphite2/src/Slot.cpp ++++ b/gfx/graphite2/src/Slot.cpp +@@ -80,20 +80,20 @@ void Slot::set(const Slot & orig, int ch + + void Slot::update(int /*numGrSlots*/, int numCharInfo, Position &relpos) + { + m_before += numCharInfo; + m_after += numCharInfo; + m_position = m_position + relpos; + } + +-Position Slot::finalise(const Segment *seg, const Font *font, Position & base, Rect & bbox, uint8 attrLevel, float & clusterMin, bool rtl, bool isFinal) ++Position Slot::finalise(const Segment *seg, const Font *font, Position & base, Rect & bbox, uint8 attrLevel, float & clusterMin, bool rtl, bool isFinal, int depth) + { + SlotCollision *coll = NULL; +- if (attrLevel && m_attLevel > attrLevel) return Position(0, 0); ++ if (depth > 100 || (attrLevel && m_attLevel > attrLevel)) return Position(0, 0); + float scale = font ? font->scale() : 1.0f; + Position shift(m_shift.x * (rtl * -2 + 1) + m_just, m_shift.y); + float tAdvance = m_advance.x + m_just; + if (isFinal && (coll = seg->collisionInfo(this))) + { + const Position &collshift = coll->offset(); + if (!(coll->flags() & SlotCollision::COLL_KERN) || rtl) + shift = shift + collshift; +@@ -128,23 +128,23 @@ Position Slot::finalise(const Segment *s + if (glyphFace) + { + Rect ourBbox = glyphFace->theBBox() * scale + m_position; + bbox = bbox.widen(ourBbox); + } + + if (m_child && m_child != this && m_child->attachedTo() == this) + { +- Position tRes = m_child->finalise(seg, font, m_position, bbox, attrLevel, clusterMin, rtl, isFinal); ++ Position tRes = m_child->finalise(seg, font, m_position, bbox, attrLevel, clusterMin, rtl, isFinal, depth + 1); + if ((!m_parent || m_advance.x >= 0.5f) && tRes.x > res.x) res = tRes; + } + + if (m_parent && m_sibling && m_sibling != this && m_sibling->attachedTo() == m_parent) + { +- Position tRes = m_sibling->finalise(seg, font, base, bbox, attrLevel, clusterMin, rtl, isFinal); ++ Position tRes = m_sibling->finalise(seg, font, base, bbox, attrLevel, clusterMin, rtl, isFinal, depth + 1); + if (tRes.x > res.x) res = tRes; + } + + if (!m_parent && clusterMin < base.x) + { + Position adj = Position(m_position.x - clusterMin, 0.); + res += adj; + m_position += adj; +@@ -160,35 +160,35 @@ int32 Slot::clusterMetric(const Segment + return 0; + Rect bbox = seg->theGlyphBBoxTemporary(glyph()); + float clusterMin = 0.; + Position res = finalise(seg, NULL, base, bbox, attrLevel, clusterMin, rtl, false); + + switch (metrics(metric)) + { + case kgmetLsb : +- return static_cast(bbox.bl.x); ++ return bbox.bl.x; + case kgmetRsb : +- return static_cast(res.x - bbox.tr.x); ++ return res.x - bbox.tr.x; + case kgmetBbTop : +- return static_cast(bbox.tr.y); ++ return bbox.tr.y; + case kgmetBbBottom : +- return static_cast(bbox.bl.y); ++ return bbox.bl.y; + case kgmetBbLeft : +- return static_cast(bbox.bl.x); ++ return bbox.bl.x; + case kgmetBbRight : +- return static_cast(bbox.tr.x); ++ return bbox.tr.x; + case kgmetBbWidth : +- return static_cast(bbox.tr.x - bbox.bl.x); ++ return bbox.tr.x - bbox.bl.x; + case kgmetBbHeight : +- return static_cast(bbox.tr.y - bbox.bl.y); ++ return bbox.tr.y - bbox.bl.y; + case kgmetAdvWidth : +- return static_cast(res.x); ++ return res.x; + case kgmetAdvHeight : +- return static_cast(res.y); ++ return res.y; + default : + return 0; + } + } + + #define SLOTGETCOLATTR(x) { SlotCollision *c = seg->collisionInfo(this); return c ? int(c-> x) : 0; } + + int Slot::getAttr(const Segment *seg, attrCode ind, uint8 subindex) const +@@ -290,19 +290,32 @@ void Slot::setAttr(Segment *seg, attrCod + case gr_slatAdvX : m_advance.x = value; break; + case gr_slatAdvY : m_advance.y = value; break; + case gr_slatAttTo : + { + const uint16 idx = uint16(value); + if (idx < map.size() && map[idx]) + { + Slot *other = map[idx]; +- if (other == this || other == m_parent) break; +- if (m_parent) m_parent->removeChild(this); +- if (!other->isChildOf(this) && other->child(this)) ++ if (other == this || other == m_parent || other->isCopied()) break; ++ if (m_parent) { m_parent->removeChild(this); attachTo(NULL); } ++ Slot *pOther = other; ++ int count = 0; ++ bool foundOther = false; ++ while (pOther) ++ { ++ ++count; ++ if (pOther == this) foundOther = true; ++ pOther = pOther->attachedTo(); ++ } ++ for (pOther = m_child; pOther; pOther = pOther->m_child) ++ ++count; ++ for (pOther = m_sibling; pOther; pOther = pOther->m_sibling) ++ ++count; ++ if (count < 100 && !foundOther && other->child(this)) + { + attachTo(other); + if ((map.dir() != 0) ^ (idx > subindex)) + m_with = Position(advance(), 0); + else // normal match to previous root + m_attach = Position(other->advance(), 0); + } + } +@@ -416,41 +429,34 @@ bool Slot::sibling(Slot *ap) + m_sibling = ap; + else + return m_sibling->sibling(ap); + return true; + } + + bool Slot::removeChild(Slot *ap) + { +- if (this == ap || !m_child) return false; ++ if (this == ap || !m_child || !ap) return false; + else if (ap == m_child) + { + Slot *nSibling = m_child->nextSibling(); +- m_child->removeSibling(nSibling); ++ m_child->nextSibling(NULL); + m_child = nSibling; + return true; + } +- else +- return m_child->removeSibling(ap); +- return true; +-} +- +-bool Slot::removeSibling(Slot *ap) +-{ +- if (this == ap || !m_sibling) return false; +- else if (ap == m_sibling) ++ for (Slot *p = m_child; p; p = p->m_sibling) + { +- m_sibling = m_sibling->nextSibling(); +- if (m_sibling) ap->removeSibling(m_sibling); +- return true; ++ if (p->m_sibling && p->m_sibling == ap) ++ { ++ p->m_sibling = p->m_sibling->m_sibling; ++ ap->nextSibling(NULL); ++ return true; ++ } + } +- else +- return m_sibling->removeSibling(ap); +- return true; ++ return false; + } + + void Slot::setGlyph(Segment *seg, uint16 glyphid, const GlyphFace * theGlyph) + { + m_glyphid = glyphid; + m_bidiCls = -1; + if (!theGlyph) + { +@@ -475,21 +481,23 @@ void Slot::setGlyph(Segment *seg, uint16 + if (seg->silf()->aPassBits()) + { + seg->mergePassBits(theGlyph->attrs()[seg->silf()->aPassBits()]); + if (seg->silf()->numPasses() > 16) + seg->mergePassBits(theGlyph->attrs()[seg->silf()->aPassBits()+1] << 16); + } + } + +-void Slot::floodShift(Position adj) ++void Slot::floodShift(Position adj, int depth) + { ++ if (depth > 100) ++ return; + m_position += adj; +- if (m_child) m_child->floodShift(adj); +- if (m_sibling) m_sibling->floodShift(adj); ++ if (m_child) m_child->floodShift(adj, depth + 1); ++ if (m_sibling) m_sibling->floodShift(adj, depth + 1); + } + + void SlotJustify::LoadSlot(const Slot *s, const Segment *seg) + { + for (int i = seg->silf()->numJustLevels() - 1; i >= 0; --i) + { + Justinfo *justs = seg->silf()->justAttrs() + i; + int16 *v = values + i * NUMJUSTPARAMS; +@@ -514,15 +522,14 @@ Slot * Slot::nextInCluster(const Slot *s + return base->nextSibling(); + s = base; + } + return NULL; + } + + bool Slot::isChildOf(const Slot *base) const + { +- if (m_parent == base) +- return true; +- else if (!m_parent) +- return false; +- else +- return m_parent->isChildOf(base); ++ for (Slot *p = m_parent; p; p = p->m_parent) ++ if (p == base) ++ return true; ++ return false; + } ++ +diff --git a/gfx/graphite2/src/TtfUtil.cpp b/gfx/graphite2/src/TtfUtil.cpp +--- a/gfx/graphite2/src/TtfUtil.cpp ++++ b/gfx/graphite2/src/TtfUtil.cpp +@@ -891,25 +891,27 @@ const void * FindCmapSubtable(const void + ----------------------------------------------------------------------------------------------*/ + bool CheckCmapSubtable4(const void * pCmapSubtable4, const void * pCmapEnd /*, unsigned int maxgid*/) + { + size_t table_len = (const byte *)pCmapEnd - (const byte *)pCmapSubtable4; + if (!pCmapSubtable4) return false; + const Sfnt::CmapSubTable * pTable = reinterpret_cast(pCmapSubtable4); + // Bob H say some freeware TT fonts have version 1 (eg, CALIGULA.TTF) + // so don't check subtable version. 21 Mar 2002 spec changes version to language. +- if (be::swap(pTable->format) != 4) return false; ++ if (table_len < sizeof(*pTable) || be::swap(pTable->format) != 4) return false; + const Sfnt::CmapSubTableFormat4 * pTable4 = reinterpret_cast(pCmapSubtable4); ++ if (table_len < sizeof(*pTable4)) ++ return false; + uint16 length = be::swap(pTable4->length); + if (length > table_len) + return false; + if (length < sizeof(Sfnt::CmapSubTableFormat4)) + return false; + uint16 nRanges = be::swap(pTable4->seg_count_x2) >> 1; +- if (length < sizeof(Sfnt::CmapSubTableFormat4) + 4 * nRanges * sizeof(uint16)) ++ if (!nRanges || length < sizeof(Sfnt::CmapSubTableFormat4) + 4 * nRanges * sizeof(uint16)) + return false; + // check last range is properly terminated + uint16 chEnd = be::peek(pTable4->end_code + nRanges - 1); + if (chEnd != 0xFFFF) + return false; + #if 0 + int lastend = -1; + for (int i = 0; i < nRanges; ++i) +@@ -999,17 +1001,17 @@ gid16 CmapSubtable4Lookup(const void * p + uint16 idRangeOffset = be::peek(pMid += nSeg); + + if (idRangeOffset == 0) + return (uint16)(idDelta + nUnicodeId); // must use modulus 2^16 + + // Look up value in glyphIdArray + const ptrdiff_t offset = (nUnicodeId - chStart) + (idRangeOffset >> 1) + + (pMid - reinterpret_cast(pTable)); +- if (offset * 2 >= be::swap(pTable->length)) ++ if (offset * 2 + 1 >= be::swap(pTable->length)) + return 0; + gid16 nGlyphId = be::peek(reinterpret_cast(pTable)+offset); + // If this value is 0, return 0. Else add the idDelta + return nGlyphId ? nGlyphId + idDelta : 0; + } + + return 0; + } +@@ -1081,19 +1083,21 @@ unsigned int CmapSubtable4NextCodepoint( + /*---------------------------------------------------------------------------------------------- + Check the Microsoft UCS-4 subtable for expected values. + ----------------------------------------------------------------------------------------------*/ + bool CheckCmapSubtable12(const void *pCmapSubtable12, const void *pCmapEnd /*, unsigned int maxgid*/) + { + size_t table_len = (const byte *)pCmapEnd - (const byte *)pCmapSubtable12; + if (!pCmapSubtable12) return false; + const Sfnt::CmapSubTable * pTable = reinterpret_cast(pCmapSubtable12); +- if (be::swap(pTable->format) != 12) ++ if (table_len < sizeof(*pTable) || be::swap(pTable->format) != 12) + return false; + const Sfnt::CmapSubTableFormat12 * pTable12 = reinterpret_cast(pCmapSubtable12); ++ if (table_len < sizeof(*pTable12)) ++ return false; + uint32 length = be::swap(pTable12->length); + if (length > table_len) + return false; + if (length < sizeof(Sfnt::CmapSubTableFormat12)) + return false; + uint32 num_groups = be::swap(pTable12->num_groups); + if (num_groups > 0x10000000 || length != (sizeof(Sfnt::CmapSubTableFormat12) + (num_groups - 1) * sizeof(uint32) * 3)) + return false; +diff --git a/gfx/graphite2/src/inc/Code.h b/gfx/graphite2/src/inc/Code.h +--- a/gfx/graphite2/src/inc/Code.h ++++ b/gfx/graphite2/src/inc/Code.h +@@ -81,17 +81,17 @@ private: + _modify, + _delete; + mutable bool _own; + + void release_buffers() throw (); + void failure(const status_t) throw(); + + public: +- static size_t estimateCodeDataOut(size_t num_bytecodes); ++ static size_t estimateCodeDataOut(size_t num_bytecodes, int nRules, int nSlots); + + Code() throw(); + Code(bool is_constraint, const byte * bytecode_begin, const byte * const bytecode_end, + uint8 pre_context, uint16 rule_length, const Silf &, const Face &, + enum passtype pt, byte * * const _out = 0); + Code(const Machine::Code &) throw(); + ~Code() throw(); + +@@ -107,19 +107,21 @@ public: + void externalProgramMoved(ptrdiff_t) throw(); + + int32 run(Machine &m, slotref * & map) const; + + CLASS_NEW_DELETE; + }; + + inline +-size_t Machine::Code::estimateCodeDataOut(size_t n_bc) ++size_t Machine::Code::estimateCodeDataOut(size_t n_bc, int nRules, int nSlots) + { +- return (n_bc + 1) * (sizeof(instr)+sizeof(byte)); ++ // max is: all codes are instructions + 1 for each rule + max tempcopies ++ // allocate space for separate maximal code and data then merge them later ++ return (n_bc + nRules + nSlots) * sizeof(instr) + n_bc * sizeof(byte); + } + + + inline Machine::Code::Code() throw() + : _code(0), _data(0), _data_size(0), _instr_count(0), _max_ref(0), + _status(loaded), _constraint(false), _modify(false), _delete(false), + _own(false) + { +diff --git a/gfx/graphite2/src/inc/Face.h b/gfx/graphite2/src/inc/Face.h +--- a/gfx/graphite2/src/inc/Face.h ++++ b/gfx/graphite2/src/inc/Face.h +@@ -82,17 +82,17 @@ public: + uint16 languageForLocale(const char * locale) const; + + // Features + uint16 numFeatures() const; + const FeatureRef * featureById(uint32 id) const; + const FeatureRef * feature(uint16 index) const; + + // Glyph related +- uint16 getGlyphMetric(uint16 gid, uint8 metric) const; ++ int32 getGlyphMetric(uint16 gid, uint8 metric) const; + uint16 findPseudo(uint32 uid) const; + + // Errors + unsigned int error() const { return m_error; } + bool error(Error e) { m_error = e.error(); return false; } + unsigned int error_context() const { return m_error; } + void error_context(unsigned int errcntxt) { m_errcntxt = errcntxt; } + +diff --git a/gfx/graphite2/src/inc/GlyphFace.h b/gfx/graphite2/src/inc/GlyphFace.h +--- a/gfx/graphite2/src/inc/GlyphFace.h ++++ b/gfx/graphite2/src/inc/GlyphFace.h +@@ -46,17 +46,17 @@ class GlyphFace + public: + GlyphFace(); + template + GlyphFace(const Rect & bbox, const Position & adv, I first, const I last); + + const Position & theAdvance() const; + const Rect & theBBox() const { return m_bbox; } + const sparse & attrs() const { return m_attrs; } +- uint16 getMetric(uint8 metric) const; ++ int32 getMetric(uint8 metric) const; + + CLASS_NEW_DELETE; + private: + Rect m_bbox; // bounding box metrics in design units + Position m_advance; // Advance width and height in design units + sparse m_attrs; + }; + +diff --git a/gfx/graphite2/src/inc/Machine.h b/gfx/graphite2/src/inc/Machine.h +--- a/gfx/graphite2/src/inc/Machine.h ++++ b/gfx/graphite2/src/inc/Machine.h +@@ -179,17 +179,17 @@ inline SlotMap& Machine::slotMap() const + return _map; + } + + inline Machine::status_t Machine::status() const throw() + { + return _status; + } + +-inline void Machine::check_final_stack(const int32 * const sp) ++inline void Machine::check_final_stack(const stack_t * const sp) + { + stack_t const * const base = _stack + STACK_GUARD, + * const limit = base + STACK_MAX; + if (sp < base) _status = stack_underflow; // This should be impossible now. + else if (sp >= limit) _status = stack_overflow; // So should this. + else if (sp != base) _status = stack_not_empty; + } + +diff --git a/gfx/graphite2/src/inc/Pass.h b/gfx/graphite2/src/inc/Pass.h +--- a/gfx/graphite2/src/inc/Pass.h ++++ b/gfx/graphite2/src/inc/Pass.h +@@ -76,17 +76,17 @@ private: + void dumpRuleEventConsidered(const FiniteStateMachine & fsm, const RuleEntry & re) const; + void dumpRuleEventOutput(const FiniteStateMachine & fsm, vm::Machine & m, const Rule & r, Slot * os) const; + void adjustSlot(int delta, Slot * & slot_out, SlotMap &) const; + bool collisionShift(Segment *seg, int dir, json * const dbgout) const; + bool collisionKern(Segment *seg, int dir, json * const dbgout) const; + bool collisionFinish(Segment *seg, GR_MAYBE_UNUSED json * const dbgout) const; + bool resolveCollisions(Segment *seg, Slot *slot, Slot *start, ShiftCollider &coll, bool isRev, + int dir, bool &moved, bool &hasCol, json * const dbgout) const; +- float resolveKern(Segment *seg, Slot *slot, Slot *start, KernCollider &coll, int dir, ++ float resolveKern(Segment *seg, Slot *slot, Slot *start, int dir, + float &ymin, float &ymax, json *const dbgout) const; + + const Silf * m_silf; + uint16 * m_cols; + Rule * m_rules; // rules + RuleEntry * m_ruleMap; + uint16 * m_startStates; // prectxt length + uint16 * m_transitions; +diff --git a/gfx/graphite2/src/inc/Rule.h b/gfx/graphite2/src/inc/Rule.h +--- a/gfx/graphite2/src/inc/Rule.h ++++ b/gfx/graphite2/src/inc/Rule.h +@@ -97,17 +97,17 @@ bool State::empty() const + return rules_end == rules; + } + + + class SlotMap + { + public: + enum {MAX_SLOTS=64}; +- SlotMap(Segment & seg, uint8 direction); ++ SlotMap(Segment & seg, uint8 direction, int maxSize); + + Slot * * begin(); + Slot * * end(); + size_t size() const; + unsigned short context() const; + void reset(Slot &, unsigned short); + + Slot * const & operator[](int n) const; +@@ -116,23 +116,25 @@ public: + void collectGarbage(Slot *& aSlot); + + Slot * highwater() { return m_highwater; } + void highwater(Slot *s) { m_highwater = s; m_highpassed = false; } + bool highpassed() const { return m_highpassed; } + void highpassed(bool v) { m_highpassed = v; } + + uint8 dir() const { return m_dir; } ++ int decMax() { return --m_maxSize; } + + Segment & segment; + private: + Slot * m_slot_map[MAX_SLOTS+1]; + unsigned short m_size; + unsigned short m_precontext; + Slot * m_highwater; ++ int m_maxSize; + uint8 m_dir; + bool m_highpassed; + }; + + + class FiniteStateMachine + { + public: +@@ -237,18 +239,19 @@ void FiniteStateMachine::Rules::accumula + return; + } + } + while (rre != rrend && out != lrend) { *out++ = *rre++; } + m_end = out; + } + + inline +-SlotMap::SlotMap(Segment & seg, uint8 direction) +-: segment(seg), m_size(0), m_precontext(0), m_highwater(0), m_dir(direction), m_highpassed(false) ++SlotMap::SlotMap(Segment & seg, uint8 direction, int maxSize) ++: segment(seg), m_size(0), m_precontext(0), m_highwater(0), ++ m_maxSize(maxSize), m_dir(direction), m_highpassed(false) + { + m_slot_map[0] = 0; + } + + inline + Slot * * SlotMap::begin() + { + return &m_slot_map[1]; // allow map to go 1 before slot_map when inserting +diff --git a/gfx/graphite2/src/inc/Segment.h b/gfx/graphite2/src/inc/Segment.h +--- a/gfx/graphite2/src/inc/Segment.h ++++ b/gfx/graphite2/src/inc/Segment.h +@@ -35,17 +35,17 @@ of the License or (at your option) any l + #include "inc/FeatureVal.h" + #include "inc/GlyphCache.h" + #include "inc/GlyphFace.h" + #include "inc/Slot.h" + #include "inc/Position.h" + #include "inc/List.h" + #include "inc/Collider.h" + +-#define MAX_SEG_GROWTH_FACTOR 256 ++#define MAX_SEG_GROWTH_FACTOR 64 + + namespace graphite2 { + + typedef Vector FeatureList; + typedef Vector SlotRope; + typedef Vector AttributeRope; + typedef Vector JustifyRope; + +@@ -154,17 +154,17 @@ public: + int8 getSlotBidiClass(Slot *s) const; + void doMirror(uint16 aMirror); + Slot *addLineEnd(Slot *nSlot); + void delLineEnd(Slot *s); + bool hasJustification() const { return m_justifies.size() != 0; } + void reverseSlots(); + + bool isWhitespace(const int cid) const; +- bool hasCollisionInfo() const { return (m_flags & SEG_HASCOLLISIONS); } ++ bool hasCollisionInfo() const { return (m_flags & SEG_HASCOLLISIONS) && m_collisions; } + SlotCollision *collisionInfo(const Slot *s) const { return m_collisions ? m_collisions + s->index() : 0; } + CLASS_NEW_DELETE + + public: //only used by: GrSegment* makeAndInitialize(const GrFont *font, const GrFace *face, uint32 script, const FeaturesHandle& pFeats/*must not be IsNull*/, encform enc, const void* pStart, size_t nChars, int dir); + bool read_text(const Face *face, const Features* pFeats/*must not be NULL*/, gr_encform enc, const void*pStart, size_t nChars); + void finalise(const Font *font, bool reverse=false); + float justify(Slot *pSlot, const Font *font, float width, enum justFlags flags, Slot *pFirst, Slot *pLast); + bool initCollisions(); +diff --git a/gfx/graphite2/src/inc/Slot.h b/gfx/graphite2/src/inc/Slot.h +--- a/gfx/graphite2/src/inc/Slot.h ++++ b/gfx/graphite2/src/inc/Slot.h +@@ -92,17 +92,17 @@ public: + void adjKern(const Position &pos) { m_shift = m_shift + pos; m_advance = m_advance + pos; } + void origin(const Position &pos) { m_position = pos + m_shift; } + void originate(int ind) { m_original = ind; } + int original() const { return m_original; } + void before(int ind) { m_before = ind; } + void after(int ind) { m_after = ind; } + bool isBase() const { return (!m_parent); } + void update(int numSlots, int numCharInfo, Position &relpos); +- Position finalise(const Segment* seg, const Font* font, Position & base, Rect & bbox, uint8 attrLevel, float & clusterMin, bool rtl, bool isFinal); ++ Position finalise(const Segment* seg, const Font* font, Position & base, Rect & bbox, uint8 attrLevel, float & clusterMin, bool rtl, bool isFinal, int depth = 0); + bool isDeleted() const { return (m_flags & DELETED) ? true : false; } + void markDeleted(bool state) { if (state) m_flags |= DELETED; else m_flags &= ~DELETED; } + bool isCopied() const { return (m_flags & COPIED) ? true : false; } + void markCopied(bool state) { if (state) m_flags |= COPIED; else m_flags &= ~COPIED; } + bool isPositioned() const { return (m_flags & POSITIONED) ? true : false; } + void markPositioned(bool state) { if (state) m_flags |= POSITIONED; else m_flags &= ~POSITIONED; } + bool isInsertBefore() const { return !(m_flags & INSERTED); } + uint8 getBidiLevel() const { return m_bidiLevel; } +@@ -123,20 +123,19 @@ public: + Position attachOffset() const { return m_attach - m_with; } + Slot* firstChild() const { return m_child; } + void firstChild(Slot *ap) { m_child = ap; } + bool child(Slot *ap); + Slot* nextSibling() const { return m_sibling; } + void nextSibling(Slot *ap) { m_sibling = ap; } + bool sibling(Slot *ap); + bool removeChild(Slot *ap); +- bool removeSibling(Slot *ap); + int32 clusterMetric(const Segment* seg, uint8 metric, uint8 attrLevel, bool rtl); + void positionShift(Position a) { m_position += a; } +- void floodShift(Position adj); ++ void floodShift(Position adj, int depth = 0); + float just() const { return m_just; } + void just(float j) { m_just = j; } + Slot *nextInCluster(const Slot *s) const; + bool isChildOf(const Slot *base) const; + + CLASS_NEW_DELETE + + private: +diff --git a/gfx/graphite2/src/inc/UtfCodec.h b/gfx/graphite2/src/inc/UtfCodec.h +--- a/gfx/graphite2/src/inc/UtfCodec.h ++++ b/gfx/graphite2/src/inc/UtfCodec.h +@@ -35,16 +35,17 @@ typedef uint32 uchar_t; + + template + struct _utf_codec + { + typedef uchar_t codeunit_t; + + static void put(codeunit_t * cp, const uchar_t , int8 & len) throw(); + static uchar_t get(const codeunit_t * cp, int8 & len) throw(); ++ static bool validate(const codeunit_t * s, const codeunit_t * e) throw(); + }; + + + template <> + struct _utf_codec<32> + { + private: + static const uchar_t limit = 0x110000; +@@ -58,16 +59,22 @@ public: + } + + inline + static uchar_t get(const codeunit_t * cp, int8 & l) throw() + { + if (cp[0] < limit) { l = 1; return cp[0]; } + else { l = -1; return 0xFFFD; } + } ++ ++ inline ++ static bool validate(codeunit_t * s, codeunit_t * e) throw() ++ { ++ return e > s; ++ } + }; + + + template <> + struct _utf_codec<16> + { + private: + static const int32 lead_offset = 0xD800 - (0x10000 >> 10); +@@ -88,22 +95,31 @@ public: + } + + inline + static uchar_t get(const codeunit_t * cp, int8 & l) throw() + { + const uint32 uh = cp[0]; + l = 1; + +- if (0xD800 > uh || uh > 0xDFFF) { return uh; } ++ if (uh < 0xD800|| uh > 0xDFFF) { return uh; } + const uint32 ul = cp[1]; +- if (uh > 0xDBFF || 0xDC00 > ul || ul > 0xDFFF) { l = -1; return 0xFFFD; } ++ if (uh > 0xDBFF || ul < 0xDC00 || ul > 0xDFFF) { l = -1; return 0xFFFD; } + ++l; + return (uh<<10) + ul + surrogate_offset; + } ++ ++ inline ++ static bool validate(codeunit_t * s, codeunit_t * e) throw() ++ { ++ const ptrdiff_t n = e-s; ++ if (n <= 0) return n == 0; ++ const uint32 u = *(s+(n-1)); // Get the last codepoint ++ return (u < 0xD800 || u > 0xDBFF); ++ } + }; + + + template <> + struct _utf_codec<8> + { + private: + static const int8 sz_lut[16]; +@@ -143,16 +159,34 @@ public: + + if (l != seq_sz || toolong) + { + l = -l; + return 0xFFFD; + } + return u; + } ++ ++ inline ++ static bool validate(codeunit_t * s, codeunit_t * e) throw() ++ { ++ const ptrdiff_t n = e-s; ++ if (n <= 0) return n == 0; ++ s += (n-1); ++ if (*s < 0x80) return true; ++ if (*s >= 0xC0) return false; ++ if (n == 1) return true; ++ if (*--s < 0x80) return true; ++ if (*s >= 0xe0) return false; ++ if (n == 2 || *s >= 0xC0) return true; ++ if (*--s < 0x80) return true; ++ if (*s >= 0xF0) return false; ++ return true; ++ } ++ + }; + + + template + class _utf_iterator + { + typedef _utf_codec codec; + +@@ -195,16 +229,21 @@ public: + + template + struct utf + { + typedef typename _utf_codec::codeunit_t codeunit_t; + + typedef _utf_iterator iterator; + typedef _utf_iterator const_iterator; ++ ++ inline ++ static bool validate(codeunit_t * s, codeunit_t * e) throw() { ++ return _utf_codec::validate(s,e); ++ } + }; + + + typedef utf utf32; + typedef utf utf16; + typedef utf utf8; + + } // namespace graphite2 +diff --git a/gfx/graphite2/src/inc/opcode_table.h b/gfx/graphite2/src/inc/opcode_table.h +--- a/gfx/graphite2/src/inc/opcode_table.h ++++ b/gfx/graphite2/src/inc/opcode_table.h +@@ -113,13 +113,13 @@ static const opcode_t opcode_table[] = + {{NILOP,NILOP}, 0, "PUT_SUBS3"}, + {{do_(put_glyph), NILOP}, 2, "PUT_GLYPH"}, // output_class output_class + {{do2(push_glyph_attr)}, 3, "PUSH_GLYPH_ATTR"}, // gattrnum gattrnum slot + {{do2(push_att_to_glyph_attr)}, 3, "PUSH_ATT_TO_GLYPH_ATTR"}, // gattrnum gattrnum slot + {{do2(bor)}, 0, "BITOR"}, + {{do2(band)}, 0, "BITAND"}, + {{do2(bnot)}, 0, "BITNOT"}, // 0x40 + {{do2(setbits)}, 4, "BITSET"}, +- {{do2(set_feat)}, 2, "SET_FEAT"}, ++ {{do_(set_feat), NILOP}, 2, "SET_FEAT"}, // featidx slot + // private opcodes for internal use only, comes after all other on disk opcodes. + {{do_(temp_copy), NILOP}, 0, "TEMP_COPY"} + }; + +diff --git a/gfx/graphite2/src/inc/opcodes.h b/gfx/graphite2/src/inc/opcodes.h +--- a/gfx/graphite2/src/inc/opcodes.h ++++ b/gfx/graphite2/src/inc/opcodes.h +@@ -62,17 +62,18 @@ of the License or (at your option) any l + // ip = The current instruction pointer + // endPos = Position of advance of last cluster + // dir = writing system directionality of the font + + + // #define NOT_IMPLEMENTED assert(false) + #define NOT_IMPLEMENTED + +-#define binop(op) const int32 a = pop(); *sp = int32(*sp) op a ++#define binop(op) const uint32 a = pop(); *sp = uint32(*sp) op a ++#define sbinop(op) const int32 a = pop(); *sp = int32(*sp) op a + #define use_params(n) dp += n + + #define declare_params(n) const byte * param = dp; \ + use_params(n); + + #define push(n) { *++sp = n; } + #define pop() (*sp--) + #define slotat(x) (map[(x)]) +@@ -125,17 +126,17 @@ STARTOP(sub) + ENDOP + + STARTOP(mul) + binop(*); + ENDOP + + STARTOP(div_) + if (*sp == 0) DIE; +- binop(/); ++ sbinop(/); + ENDOP + + STARTOP(min_) + const int32 a = pop(), b = *sp; + if (a < b) *sp = a; + ENDOP + + STARTOP(max_) +@@ -176,29 +177,29 @@ STARTOP(equal) + binop(==); + ENDOP + + STARTOP(not_eq_) + binop(!=); + ENDOP + + STARTOP(less) +- binop(<); ++ sbinop(<); + ENDOP + + STARTOP(gtr) +- binop(>); ++ sbinop(>); + ENDOP + + STARTOP(less_eq) +- binop(<=); ++ sbinop(<=); + ENDOP + + STARTOP(gtr_eq) +- binop(>=); ++ sbinop(>=); + ENDOP + + STARTOP(next) + if (map - &smap[0] >= int(smap.size())) DIE + if (is) + { + if (is == smap.highwater()) + smap.highpassed(true); +@@ -237,17 +238,17 @@ STARTOP(put_subs_8bit_obs) + index = seg.findClassIndex(input_class, slot->gid()); + is->setGlyph(&seg, seg.getClassGlyph(output_class, index)); + } + ENDOP + + STARTOP(put_copy) + declare_params(1); + const int slot_ref = int8(*param); +- if (is) ++ if (is && !is->isDeleted()) + { + slotref ref = slotat(slot_ref); + if (ref && ref != is) + { + int16 *tempUserAttrs = is->userAttrs(); + if (is->attachedTo() || is->firstChild()) DIE + Slot *prev = is->prev(); + Slot *next = is->next(); +@@ -262,16 +263,17 @@ STARTOP(put_copy) + is->attachedTo()->child(is); + } + is->markCopied(false); + is->markDeleted(false); + } + ENDOP + + STARTOP(insert) ++ if (smap.decMax() <= 0) DIE; + Slot *newSlot = seg.newSlot(); + if (!newSlot) DIE; + Slot *iss = is; + while (iss && iss->isDeleted()) iss = iss->next(); + if (!iss) + { + if (seg.last()) + { +@@ -550,31 +552,31 @@ ENDOP + + STARTOP(iattr_add) + declare_params(2); + const attrCode slat = attrCode(uint8(param[0])); + const size_t idx = uint8(param[1]); + const int val = int(pop()); + if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) == 0) + { +- seg.positionSlots(0, *smap.begin(), *(smap.end()-1), dir); ++ seg.positionSlots(0, *smap.begin(), *(smap.end()-1), seg.currdir()); + flags |= POSITIONED; + } + int res = is->getAttr(&seg, slat, idx); + is->setAttr(&seg, slat, idx, val + res, smap); + ENDOP + + STARTOP(iattr_sub) + declare_params(2); + const attrCode slat = attrCode(uint8(param[0])); + const size_t idx = uint8(param[1]); + const int val = int(pop()); + if ((slat == gr_slatPosX || slat == gr_slatPosY) && (flags & POSITIONED) == 0) + { +- seg.positionSlots(0, *smap.begin(), *(smap.end()-1), dir); ++ seg.positionSlots(0, *smap.begin(), *(smap.end()-1), seg.currdir()); + flags |= POSITIONED; + } + int res = is->getAttr(&seg, slat, idx); + is->setAttr(&seg, slat, idx, res - val, smap); + ENDOP + + STARTOP(push_proc_state) + use_params(1); + -- cgit v1.2.3 From f36a1ebaab67bd05a62af990312d43a845daa9f2 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 27 Apr 2016 10:18:53 -0500 Subject: gnu: Add Fossil. * gnu/packages/version-control.scm (fossil): New variable. * gnu/packages/patches/fossil-test-fixes.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/fossil-test-fixes.patch | 189 +++++++++++++++++++++++++++ gnu/packages/version-control.scm | 80 +++++++++++- 3 files changed, 267 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/fossil-test-fixes.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9e31ef9a4b..9308c38758 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -479,6 +479,7 @@ dist_patch_DATA = \ gnu/packages/patches/fltk-shared-lib-defines.patch \ gnu/packages/patches/fltk-xfont-on-demand.patch \ gnu/packages/patches/fontforge-svg-modtime.patch \ + gnu/packages/patches/fossil-test-fixes.patch \ gnu/packages/patches/freeimage-CVE-2015-0852.patch \ gnu/packages/patches/gawk-fts-test.patch \ gnu/packages/patches/gawk-shell.patch \ diff --git a/gnu/packages/patches/fossil-test-fixes.patch b/gnu/packages/patches/fossil-test-fixes.patch new file mode 100644 index 0000000000..e6c9f3dd74 --- /dev/null +++ b/gnu/packages/patches/fossil-test-fixes.patch @@ -0,0 +1,189 @@ +From upstream commit https://www.fossil-scm.org/fossil/info/19c216391a0ad79e + +--- fossil-src-1.34/test/file1.test ++++ fossil-src-1.34/test/file1.test +@@ -15,10 +15,12 @@ + # + ############################################################################ + # + # File utilities + # ++ ++repo_init + + proc simplify-name {testname args} { + set i 1 + foreach {path result} $args { + fossil test-simplify-name $path +@@ -65,10 +67,13 @@ + + if {$::tcl_platform(os)=="Windows NT"} { + simplify-name 108 //?/a:/a/b a:/a/b //?/UNC/a/b //a/b //?/ {} + simplify-name 109 \\\\?\\a:\\a\\b a:/a/b \\\\?\\UNC\\a\\b //a/b \\\\?\\ {} + } ++ ++# This is needed because we are now running outside of the Fossil checkout. ++file mkdir file1; cd file1 + + # Those directories are only needed for the testcase being able to "--chdir" to it. + file mkdir test1 + file mkdir test1/test2 + +From upstream commit https://www.fossil-scm.org/fossil/info/ad6de6383391bd4d + +--- fossil-src-1.34/test/utf.test ++++ fossil-src-1.34/test/utf.test +@@ -39,26 +39,29 @@ + test utf-check-$testname.$i {$::RESULT eq $result} + incr i + } + } + ++unset -nocomplain enc + array set enc [list \ + 0 binary \ + 1 binary \ + 2 unicode \ + 3 unicode-reverse \ + ] + ++unset -nocomplain bom + array set bom [list \ + 0 "" \ + 1 \xEF\xBB\xBF \ + 2 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \ + "\xFF\xFE" : "\xFE\xFF"}] \ + 3 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \ + "\xFE\xFF" : "\xFF\xFE"}] \ + ] + ++unset -nocomplain data + array set data [list \ + 0 "" \ + 1 \r \ + 2 \n \ + 3 \r\n \ +@@ -239,10 +242,11 @@ + 178 \xF4\x90\x80\x80\r \ + 179 \xF4\x90\x80\x80\n \ + 180 \xF4\x90\x80\x80\r\n \ + ] + ++unset -nocomplain extraData + array set extraData [list \ + 0 "" \ + 1 Z \ + ] + +Backport from upstream https://www.fossil-scm.org/fossil/info/60285f5876512817 +with additional non-zero exit in case of failures. + +--- fossil-src-1.34/test/merge6.test ++++ fossil-src-1.34/test/merge6.test +@@ -62,6 +62,6 @@ + fossil ls + + test merge_multi-4 {[normalize_result] eq {f1 + f2 + f3 +-f4}} ++f4}} knownBug + +--- fossil-src-1.34/test/merge_renames.test ++++ fossil-src-1.34/test/merge_renames.test +@@ -156,13 +156,13 @@ + } + + if {$deletes!=0} { + # failed + protOut "Error, the merge should not delete any file" +- test merge_renames-2 0 ++ test merge_renames-3 0 + } else { +- test merge_renames-2 1 ++ test merge_renames-3 1 + } + + ###################################### + # Test 4 # + # Reported: Ticket [67176c3aa4] # +@@ -198,14 +198,14 @@ + + fossil ls + + test merge_renames-5 {[normalize_result] eq {f1 + f2 +-f3}} ++f3}} knownBug + + ###################################### + # + # Tests for troubles not specifically linked with renames but that I'd like to + # write: + # [c26c63eb1b] - 'merge --backout' does not handle conflicts properly + # [953031915f] - Lack of warning when overwriting extra files + # [4df5f38f1e] - Troubles merging a file delete with a file change + +--- fossil-src-1.34/test/tester.tcl ++++ fossil-src-1.34/test/tester.tcl +@@ -58,10 +58,18 @@ + set VERBOSE 1 + set argv [lreplace $argv $i $i] + } else { + set VERBOSE 0 + } ++ ++set i [lsearch $argv -strict] ++if {$i>=0} { ++ set STRICT 1 ++ set argv [lreplace $argv $i $i] ++} else { ++ set STRICT 0 ++} + + if {[llength $argv]==0} { + foreach f [lsort [glob $testdir/*.test]] { + set base [file root [file tail $f]] + lappend argv $base +@@ -327,20 +335,30 @@ + } + + # Perform a test + # + set test_count 0 +-proc test {name expr} { ++proc test {name expr {constraints ""}} { + global bad_test test_count + incr test_count ++ set knownBug [expr {"knownBug" in $constraints}] + set r [uplevel 1 [list expr $expr]] + if {$r} { +- protOut "test $name OK" ++ if {$knownBug && !$::STRICT} { ++ protOut "test $name OK (knownBug)?" ++ } else { ++ protOut "test $name OK" ++ } + } else { +- protOut "test $name FAILED!" +- lappend bad_test $name +- if {$::HALT} exit ++ if {$knownBug && !$::STRICT} { ++ protOut "test $name FAILED (knownBug)!" ++ } else { ++ protOut "test $name FAILED!" ++ if {$::VERBOSE} {protOut "RESULT: $RESULT"} ++ lappend bad_test $name ++ if {$::HALT} exit ++ } + } + } + set bad_test {} + + # Return a random string N characters long. +@@ -445,4 +455,5 @@ + protOut "***** Final result: $nErr errors out of $test_count tests" + if {$nErr>0} { + protOut "***** Failures: $bad_test" ++ exit 1 + } diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 117d01d5d0..9107369482 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2013, 2014 Andreas Enge ;;; Copyright © 2015 Mathieu Lirzin ;;; Copyright © 2014, 2015 Mark H Weaver -;;; Copyright © 2014 Eric Bavier +;;; Copyright © 2014, 2016 Eric Bavier ;;; Copyright © 2015, 2016 Efraim Flashner ;;; Copyright © 2015 Kyle Meyer ;;; Copyright © 2015 Ricardo Wurmus @@ -29,7 +29,7 @@ #:use-module ((guix licenses) #:select (asl2.0 bsd-2 gpl1+ gpl2 gpl2+ gpl3+ lgpl2.1 - x11-style)) + public-domain x11-style)) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) @@ -38,7 +38,6 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix build-system trivial) - #:use-module (guix build utils) #:use-module (gnu packages apr) #:use-module (gnu packages autotools) #:use-module (gnu packages asciidoc) @@ -1125,3 +1124,78 @@ Mercurial, Bazaar, Darcs, CVS, Fossil, and Veracity.") "This package allows you to use your hubic account as a \"special repository\" with git-annex.") (license gpl3+))) + +(define-public fossil + (package + (name "fossil") + (version "1.34") + (source + (origin + (method url-fetch) + ;; Upstream source affected by + ;; http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20962 + (uri (string-append + "https://web.archive.org/web/20160402202958/" + "https://www.fossil-scm.org/download/fossil-src-" + version ".tar.gz")) + (sha256 + (base32 + "17x4vgjcfihwmq195qg32irp50panvjqfpvhqydfvv4ghwzbi9jk")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Commit 0a2ebe57 on 2015-08-03 18:35:53 changed output formatting + ;; for some commands, but affected tests were not updated. Use + ;; substitute here, which is more concise than patching. + (substitute* "test/clean.test" + (("NEW ") "NEW ")) + (substitute* '("test/revert.test" "test/mv-rm.test") + (("REVERTED:") "REVERT ") + (("DELETE:") "DELETE ") + (("UNMANAGE:") "UNMANAGE ")) + ;; Fix use of __DATE__ and __TIME__ + (substitute* "src/main.c" + (("Compiled on %s %s") "Compiled") + (("__DATE__, __TIME__, ") "")) + #t)) + (patches (list (search-patch "fossil-test-fixes.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("tcl" ,tcl) ;for configuration only + ("which" ,which) ;for tests only + ("ed" ,ed))) ;ditto + (inputs + `(("openssl" ,openssl) + ("zlib" ,zlib) + ("sqlite" ,sqlite))) + (arguments + `(#:configure-flags (list "--with-openssl=auto" + "--disable-internal-sqlite") + #:test-target "test" + #:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs (configure-flags '()) + #:allow-other-keys) + ;; The 'configure' script is not an autoconf script and + ;; chokes on unrecognized options. + (zero? (apply system* + "./configure" + (string-append "--prefix=" + (assoc-ref outputs "out")) + configure-flags)))) + (add-before 'check 'test-setup + (lambda _ + (setenv "USER" "guix") + (setenv "TZ" "UTC") + ;; Fixing the th1 test would require many backports, so + ;; just disable for now. + (delete-file "test/th1.test") + #t))))) + (home-page "https://fossil-scm.org") + (synopsis "Software configuration management system") + (description + "Fossil is a distributed source control management system which supports +access and administration over HTTP CGI or via a built-in HTTP server. It has +a built-in wiki, built-in file browsing, built-in tickets system, etc.") + (license (list public-domain ;src/miniz.c, src/shell.c + bsd-2)))) -- cgit v1.2.3 From b0e52f52b76ecc37a9b6469e6f72c4b4757979ce Mon Sep 17 00:00:00 2001 From: Rob Syme Date: Sat, 30 Apr 2016 08:39:27 +1000 Subject: gnu: ruby: Update to 2.3.1. * gnu/packages/ruby.scm (ruby): Update to 2.3.1. [origin] Add symlink patch. * gnu/packages/patches/ruby-symlinkfix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch. --- gnu/local.mk | 1 + gnu/packages/patches/ruby-symlinkfix.patch | 53 ++++++++++++++++++++++++++++++ gnu/packages/ruby.scm | 5 +-- 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/ruby-symlinkfix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9308c38758..7556fa76e8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -723,6 +723,7 @@ dist_patch_DATA = \ gnu/packages/patches/readline-link-ncurses.patch \ gnu/packages/patches/ripperx-missing-file.patch \ gnu/packages/patches/rsem-makefile.patch \ + gnu/packages/patches/ruby-symlinkfix.patch \ gnu/packages/patches/sed-hurd-path-max.patch \ gnu/packages/patches/scheme48-tests.patch \ gnu/packages/patches/scotch-test-threading.patch \ diff --git a/gnu/packages/patches/ruby-symlinkfix.patch b/gnu/packages/patches/ruby-symlinkfix.patch new file mode 100644 index 0000000000..16beecc97a --- /dev/null +++ b/gnu/packages/patches/ruby-symlinkfix.patch @@ -0,0 +1,53 @@ +Fix symlinks to '..' to fix rubygems improperly expanding symlinked +paths. Without this fix, some gems fail to install. This patch is applied in +rubygems 2.5.2, but ruby version 2.3.1 bundles an older version of rubygems +(2.5.1). + +--- a/lib/rubygems/package.rb ++++ b/lib/rubygems/package.rb +@@ -383,7 +383,7 @@ def extract_tar_gz io, destination_dir, pattern = "*" # :nodoc: + FileUtils.chmod entry.header.mode, destination + end if entry.file? + +- File.symlink(install_location(entry.header.linkname, destination_dir), destination) if entry.symlink? ++ File.symlink(entry.header.linkname, destination) if entry.symlink? + + verbose destination + end +diff --git a/test/rubygems/test_gem_package.rb b/test/rubygems/test_gem_package.rb +index 7848bc2..f287bd3 100644 +--- a/test/rubygems/test_gem_package.rb ++++ b/test/rubygems/test_gem_package.rb +@@ -428,19 +428,25 @@ def test_extract_tar_gz_absolute + "#{@destination} is not allowed", e.message) + end + +- def test_extract_tar_gz_symlink_absolute ++ def test_extract_tar_gz_symlink_relative_path ++ skip 'symlink not supported' if Gem.win_platform? ++ + package = Gem::Package.new @gem + + tgz_io = util_tar_gz do |tar| +- tar.add_symlink 'code.rb', '/absolute.rb', 0644 ++ tar.add_file 'relative.rb', 0644 do |io| io.write 'hi' end ++ tar.mkdir 'lib', 0755 ++ tar.add_symlink 'lib/foo.rb', '../relative.rb', 0644 + end + +- e = assert_raises Gem::Package::PathError do +- package.extract_tar_gz tgz_io, @destination +- end ++ package.extract_tar_gz tgz_io, @destination + +- assert_equal("installing into parent path /absolute.rb of " + +- "#{@destination} is not allowed", e.message) ++ extracted = File.join @destination, 'lib/foo.rb' ++ assert_path_exists extracted ++ assert_equal '../relative.rb', ++ File.readlink(extracted) ++ assert_equal 'hi', ++ File.read(extracted) + end + + def test_extract_tar_gz_directory diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index bafa7e3181..b8a6d01811 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -46,7 +46,7 @@ (define-public ruby (package (name "ruby") - (version "2.3.0") + (version "2.3.1") (source (origin (method url-fetch) @@ -55,8 +55,9 @@ "/ruby-" version ".tar.xz")) (sha256 (base32 - "15s0dsb5ynf3d2w5gzawnszq5594fqvapv2y7a0qw16przq5l4kh")) + "0f3395q7pd2hrl2gv26bib80038sjawxgmhl9zn22fjs9m9va9b7")) (modules '((guix build utils))) + (patches (search-patches "ruby-symlinkfix.patch")) (snippet `(begin ;; Remove bundled libffi (delete-file-recursively -- cgit v1.2.3 From e411ce186021540770c389ec13b7b5b42252c4bb Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 29 Apr 2016 03:31:41 -0400 Subject: gnu: poppler: Fix CVE-2015-8868. * gnu/packages/pdf.scm (poppler)[replacement]: New field. (poppler/fixed): New variable. * gnu/packages/patches/poppler-CVE-2015-8868.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/poppler-CVE-2015-8868.patch | 30 ++++++++++++++++++++++++ gnu/packages/pdf.scm | 8 +++++++ 3 files changed, 39 insertions(+) create mode 100644 gnu/packages/patches/poppler-CVE-2015-8868.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7556fa76e8..e45405fe0e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -681,6 +681,7 @@ dist_patch_DATA = \ gnu/packages/patches/plink-1.07-unclobber-i.patch \ gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ gnu/packages/patches/polkit-drop-test.patch \ + gnu/packages/patches/poppler-CVE-2015-8868.patch \ gnu/packages/patches/portaudio-audacity-compat.patch \ gnu/packages/patches/procmail-ambiguous-getline-debian.patch \ gnu/packages/patches/pt-scotch-build-parallelism.patch \ diff --git a/gnu/packages/patches/poppler-CVE-2015-8868.patch b/gnu/packages/patches/poppler-CVE-2015-8868.patch new file mode 100644 index 0000000000..ac78d32ffa --- /dev/null +++ b/gnu/packages/patches/poppler-CVE-2015-8868.patch @@ -0,0 +1,30 @@ +Fixes CVE-2015-8868 (heap overflow). + +Upstream source: +https://cgit.freedesktop.org/poppler/poppler/commit/?id=b3425dd3261679958cd56c0f71995c15d2124433 + +From b3425dd3261679958cd56c0f71995c15d2124433 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Tue, 22 Dec 2015 22:50:33 +0100 +Subject: Do not crash on invalid files + +Bug #93476 + +diff --git a/poppler/Function.cc b/poppler/Function.cc +index 67283df..ee5afc1 100644 +--- a/poppler/Function.cc ++++ b/poppler/Function.cc +@@ -577,6 +577,10 @@ ExponentialFunction::ExponentialFunction(Object *funcObj, Dict *dict) { + goto err2; + } + n = obj1.arrayGetLength(); ++ if (unlikely(n > funcMaxOutputs)) { ++ error(errSyntaxError, -1, "Function's C0 array is wrong length"); ++ n = funcMaxOutputs; ++ } + for (i = 0; i < n; ++i) { + obj1.arrayGet(i, &obj2); + if (!obj2.isNum()) { +-- +cgit v0.10.2 + diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 1d33be85d5..8f9f5dd503 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -53,6 +53,7 @@ (package (name "poppler") (version "0.37.0") + (replacement poppler/fixed) (source (origin (method url-fetch) (uri (string-append "https://poppler.freedesktop.org/poppler-" @@ -104,6 +105,13 @@ (license license:gpl2+) (home-page "http://poppler.freedesktop.org/"))) +(define poppler/fixed + (package + (inherit poppler) + (source (origin + (inherit (package-source poppler)) + (patches (search-patches "poppler-CVE-2015-8868.patch")))))) + (define-public poppler-qt4 (package (inherit poppler) (name "poppler-qt4") -- cgit v1.2.3 From acb31b5dcd008ee7b34d83c8d2170dcdffb3199b Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 30 Apr 2016 11:43:35 +0200 Subject: gnu: asymptote: Update to 2.37. * gnu/packages/plotutils.scm (asymptote): Update to 2.37. * gnu/packages/patches/asymptote-gsl2.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove reference. --- gnu/local.mk | 1 - gnu/packages/patches/asymptote-gsl2.patch | 33 ------------------------------- gnu/packages/plotutils.scm | 26 ++++++++++++++---------- 3 files changed, 16 insertions(+), 44 deletions(-) delete mode 100644 gnu/packages/patches/asymptote-gsl2.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e45405fe0e..702c9a602e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -415,7 +415,6 @@ dist_patch_DATA = \ gnu/packages/patches/alsa-lib-mips-atomic-fix.patch \ gnu/packages/patches/apr-skip-getservbyname-test.patch \ gnu/packages/patches/arb-ldconfig.patch \ - gnu/packages/patches/asymptote-gsl2.patch \ gnu/packages/patches/ath9k-htc-firmware-binutils.patch \ gnu/packages/patches/ath9k-htc-firmware-gcc.patch \ gnu/packages/patches/ath9k-htc-firmware-objcopy.patch \ diff --git a/gnu/packages/patches/asymptote-gsl2.patch b/gnu/packages/patches/asymptote-gsl2.patch deleted file mode 100644 index 4f73d16d7f..0000000000 --- a/gnu/packages/patches/asymptote-gsl2.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 71ff9e769ba5d9995b367201f0d41b7a8dedab9d Mon Sep 17 00:00:00 2001 -From: John Bowman -Date: Sat, 14 Nov 2015 01:25:56 -0700 -Subject: [PATCH] Support GSL 2.0. - ---- - gsl.cc | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/gsl.cc b/gsl.cc -index b500557..0f81dc6 100644 ---- a/gsl.cc -+++ b/gsl.cc -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #include "opsymbols.h" - -@@ -1088,7 +1089,11 @@ void gen_rungsl_venv(venv &ve) - addGSLDOUBLE2Func(SYM(F)); - addGSLDOUBLE2Func(SYM(E)); - addGSLDOUBLE3Func(SYM(P),SYM(phi),SYM(k),SYM(n)); -+#if GSL_MAJOR_VERSION >= 2 -+ addGSLDOUBLE2Func(SYM(D),SYM(phi),SYM(k)); -+#else - addGSLDOUBLE3Func(SYM(D),SYM(phi),SYM(k),SYM(n)); -+#endif - addGSLDOUBLE2Func(SYM(RC),SYM(x),SYM(y)); - addGSLDOUBLE3Func(SYM(RD),SYM(x),SYM(y),SYM(z)); - addGSLDOUBLE3Func(SYM(RF),SYM(x),SYM(y),SYM(z)); diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm index 67f692daf5..3fdd539835 100644 --- a/gnu/packages/plotutils.scm +++ b/gnu/packages/plotutils.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2015 Eric Bavier +;;; Copyright © 2016 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -171,15 +172,14 @@ colors, styles, options and details.") (define-public asymptote (package (name "asymptote") - (version "2.35") + (version "2.37") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/asymptote/" version "/asymptote-" version ".src.tgz")) (sha256 (base32 - "11f28vxw0ybhvl7vxmqcdwvw7y6gz55ykw9ybgzb2px6lsvgag7z")) - (patches (search-patches "asymptote-gsl2.patch")))) + "16nh02m52mk9a53i8wc6l9vg710gnzr3lfbypcbvamghvaj0458i")))) (build-system gnu-build-system) ;; Note: The 'asy' binary retains a reference to docdir for use with its ;; "help" command in interactive mode, so adding a "doc" output is not @@ -206,13 +206,19 @@ colors, styles, options and details.") (string-append "--with-context=" (assoc-ref %outputs "out") "/share/texmf/tex/context/third")) - #:phases (modify-phases %standard-phases - (add-before 'build 'patch-pdf-viewer - (lambda _ - ;; Default to a free pdf viewer - (substitute* "settings.cc" - (("defaultPDFViewer=\"acroread\"") - "defaultPDFViewer=\"gv\""))))))) + #:phases + (modify-phases %standard-phases + (add-before 'build 'patch-pdf-viewer + (lambda _ + ;; Default to a free pdf viewer + (substitute* "settings.cc" + (("defaultPDFViewer=\"acroread\"") + "defaultPDFViewer=\"gv\"")))) + (add-before 'check 'set-HOME + ;; Some tests require write access to $HOME, otherwise leading to + ;; "failed to create directory /homeless-shelter/.asy" error. + (lambda _ + (setenv "HOME" "/tmp")))))) (home-page "http://asymptote.sourceforge.net") (synopsis "Script-based vector graphics language") (description -- cgit v1.2.3