From 0a18965cc695ed5e97f579a42095e913111d46f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20H=C3=BCttel?= Date: Tue, 18 Oct 2011 22:22:16 +0000 Subject: [PATCH] Fix crash when parsing pdf, bug 387049 Package-Manager: portage-2.1.10.28/cvs/Linux x86_64 --- app-misc/strigi/ChangeLog | 8 +- app-misc/strigi/Manifest | 30 +++--- .../strigi/files/strigi-0.7.6-crash.patch | 27 ++++++ app-misc/strigi/strigi-0.7.6-r1.ebuild | 94 +++++++++++++++++++ 4 files changed, 144 insertions(+), 15 deletions(-) create mode 100644 app-misc/strigi/files/strigi-0.7.6-crash.patch create mode 100644 app-misc/strigi/strigi-0.7.6-r1.ebuild diff --git a/app-misc/strigi/ChangeLog b/app-misc/strigi/ChangeLog index ad386ee8adfd..ef19c6ad7f80 100644 --- a/app-misc/strigi/ChangeLog +++ b/app-misc/strigi/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-misc/strigi # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/strigi/ChangeLog,v 1.73 2011/09/27 19:31:56 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/strigi/ChangeLog,v 1.74 2011/10/18 22:22:16 dilfridge Exp $ + +*strigi-0.7.6-r1 (18 Oct 2011) + + 18 Oct 2011; Andreas K. Huettel + +strigi-0.7.6-r1.ebuild, +files/strigi-0.7.6-crash.patch: + Fix crash when parsing pdf, bug 387049 27 Sep 2011; Andreas K. Huettel strigi-0.7.6.ebuild: Add missing boost dependency, bug 384519 diff --git a/app-misc/strigi/Manifest b/app-misc/strigi/Manifest index eae23b4cce81..21cd38d6fc5e 100644 --- a/app-misc/strigi/Manifest +++ b/app-misc/strigi/Manifest @@ -5,29 +5,31 @@ AUX strigi-0.6.4-gcc44.patch 1024 RMD160 194d69ba906c4da9ead9349545f26567dadc8ed AUX strigi-0.6.5-gcc4.4-missing-headers.patch 1020 RMD160 91e447323303315a1f8fe282afce6add0f4c802a SHA1 308c03e5fd1b1671ea2690ceaff2426050390f92 SHA256 a16029a8caaede0c0427865a06a308fd6de0f526840b88274fab5ada0233c3c8 AUX strigi-0.7.5-ffmpeg.patch 6617 RMD160 77bf30f16e3912330ce946b78bc3524bc9d2497e SHA1 ba1de8c04b567b2a401d9dd88493a607d0ff5499 SHA256 5a61a807e98ebe79005933a01418c3a211e627df4e11ce7a4925ea0dcf4b0225 AUX strigi-0.7.5-no-qt4.patch 329 RMD160 e1e4904e4d907fcdd026d48aeeed86ee997a9797 SHA1 5f7f2a827990b59746204a0138a134bfba58ed33 SHA256 c98b889a6caf08f25eacc0e896968f6cbd2a8b317aa5aa441be4b5c49f315d38 +AUX strigi-0.7.6-crash.patch 1100 RMD160 d85443956ae033e5363abee3ed065bc45aedd65d SHA1 c92e9895a0355effd3fcbb52db4b2e1dc8c64a9a SHA256 ffb7f83bc800f4cabb27fa56e9cb401552e54ddee2e7c3282407775821217d0a AUX strigi-disable_java.patch 784 RMD160 870decf02f7bda63bae9a6f7df0b26caed753fdc SHA1 09dc828ecef7287e7286277713d07f84d6ff72bf SHA256 f267a0a804d96e9ef4cac1138f98572bec17906021282b4db905b804c33b956d DIST strigi-0.7.1.tar.bz2 936454 RMD160 4dac3c3e8937dc1e0ea5cc759c95d64ba4e24898 SHA1 9e05a875a1c62ebb5c0c59bf2114253cd1bc2a07 SHA256 d1830506da50262c80d5a3b55ee7821b132184cbd251c527db8d9d76a9242ab3 DIST strigi-0.7.5.tar.bz2 801845 RMD160 2cf9fa372de2bc06abcee25d0f41fa5f4916fa3c SHA1 0aa3632e07c58f2ab5c515004b790bda6cfefbf5 SHA256 111f5e3ede171292302b906418af0175445ca01958d40fb54879f80620b5189b DIST strigi-0.7.6.tar.xz 696840 RMD160 39762730461327ba9e17e5b9e5a7bfbb4338940d SHA1 165e352a539cf3bc821e4681e0b070bbffd161e7 SHA256 bcd2eaed7256caa084e5cfff6f3ed6a9a7ca0a2544e07f9447b24b71e571e043 EBUILD strigi-0.7.1.ebuild 2777 RMD160 416a9ddb7778fc1fccc7b018be836e98280fe863 SHA1 25aa47b2d7bc7c464f2c7a9268fc67609fa37cdd SHA256 da6027c00e964e58d539f141ff147ce2d4c282d24b4317bbb1f8d4d440d73a61 EBUILD strigi-0.7.5-r2.ebuild 2536 RMD160 9aae7c717a3db49da32a3e2c5fb77b1a080e6038 SHA1 8d12ec2e978ec296428864c24e9f6567784b77e4 SHA256 7e7bfd86d89f2162dd35487d4491fe5af2398e639cd41f77473892df2c6937fe +EBUILD strigi-0.7.6-r1.ebuild 2578 RMD160 0e0eba32ab827936536104e70e6f68c10ea09a37 SHA1 cf31884917f0c4575980e9f1da052fe672423718 SHA256 0f0a9fee7df12be4ca4ab51aa0a4b5f05b88377b901a17e39896717e56214718 EBUILD strigi-0.7.6.ebuild 2536 RMD160 613de6826c1cefe7879ed9cd55eb88ed5f3204dd SHA1 a02838926232d843bc85a959659d8a1f9be16deb SHA256 c5f8acdfc27081e4e6ca80ac2dea31852f71f48794542abe5c74e6eb436f6c57 -MISC ChangeLog 14892 RMD160 c54da8c87105107a05fad7ba59b855d832801d3c SHA1 e9da127b53b95b64ef3524406e58a2d5bfa719e1 SHA256 bb7d8c4275924bf32d4ff485aaeba2cedc5c67865474649a10b35957ddfd9dd2 +MISC ChangeLog 15083 RMD160 b1edcc496d3a87d32a7859b9aa1eae8db04bf5db SHA1 29a9e32ab00368f208d6bad511fb6b55b2a37fd5 SHA256 a45e50d4865a89c8dd5bce1c98c60ba6ff237263acc0fa7871cb557985ec4daf MISC metadata.xml 486 RMD160 6eb5e37e0646dc21260e2938d9aa6286489e10cd SHA1 d600420837886e1d487266009b803ca76643c571 SHA256 2a4f8b7f0572075a608b0a3fb2e62321b4dbdd61b231cf72218246f0351cda12 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iQIcBAEBCgAGBQJOgiTSAAoJENwGBM22xffePbgP/ig4fjTRuzY7s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yp8h+HTVMT69E0+sbneB2uqbRdlEekuza4LUrk7IRP5iQbGIHFO+k0V7rFgT +2fzp49Ro/gHoyRDKn2bmjYRmaFbZ2oF7etmxS8QEvYeE0O/lb+0sttxYfxykakVp +37Iq471Db4TP6/s98G7O0UoYFJGHeAXI4DJUsFCM68FjTXON5cIUj7C5C184Zhw/ +0P9e37mj5zOScvHV+DY98WsStYbjfskJ20HXG1ST8kXpLA8E/3xy9fvt9GHHqEV/ +rIhb9zHMPI5Gzc9voVq6voZfzSECzObPX92AlXMJoduytDrnoPIBmMrRSoRJdoxX +zPjgwROrya1LPeLe+GOU +=Dr57 -----END PGP SIGNATURE----- diff --git a/app-misc/strigi/files/strigi-0.7.6-crash.patch b/app-misc/strigi/files/strigi-0.7.6-crash.patch new file mode 100644 index 000000000000..8696a47dc51b --- /dev/null +++ b/app-misc/strigi/files/strigi-0.7.6-crash.patch @@ -0,0 +1,27 @@ +this was originally (now adapted for gentoo) +commit 23d5ce636b7897dc3f233a5293f3164dac50566d +Author: Jos van den Oever +Date: Sun Jul 31 12:32:44 2011 +0200 + + Revert patch that breaks parsing of PDF files. + The offending patch was 672c8b7b3cb4400bc505421f4cc70cf742ed9df0. + +diff -ruN strigi-0.7.6.orig/libstreamanalyzer/lib/pdf/pdfparser.cpp strigi-0.7.6/libstreamanalyzer/lib/pdf/pdfparser.cpp +--- strigi-0.7.6.orig/libstreamanalyzer/lib/pdf/pdfparser.cpp 2011-07-26 19:12:39.000000000 +0200 ++++ strigi-0.7.6/libstreamanalyzer/lib/pdf/pdfparser.cpp 2011-10-19 00:18:51.583639819 +0200 +@@ -35,12 +35,13 @@ + PdfParser::read(int32_t min, int32_t max) { + int32_t off = (int32_t)(pos-start); + int32_t d = (int32_t)(stream->position() - bufferStart); +- bufferStart += off; ++ min += d; ++ if (max > 0) max += d; + stream->reset(bufferStart); + int32_t n = stream->read(start, min, max); + // printf("objstart %i %i\n", d, n); + if (n < min) return stream->status(); +- pos = start; ++ pos = start + off; + end = start + n; + return Ok; + } diff --git a/app-misc/strigi/strigi-0.7.6-r1.ebuild b/app-misc/strigi/strigi-0.7.6-r1.ebuild new file mode 100644 index 000000000000..e90afaf1738c --- /dev/null +++ b/app-misc/strigi/strigi-0.7.6-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/strigi/strigi-0.7.6-r1.ebuild,v 1.1 2011/10/18 22:22:16 dilfridge Exp $ + +EAPI=4 + +if [[ "${PV}" != "9999" ]]; then + SRC_URI="http://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" +else + EGIT_REPO_URI="git://anongit.kde.org/strigi" + GIT_ECLASS="git-2" + EGIT_HAS_SUBMODULES="true" + KEYWORDS="" +fi + +inherit cmake-utils ${GIT_ECLASS} + +DESCRIPTION="Fast crawling desktop search engine with Qt4 GUI" +HOMEPAGE="https://projects.kde.org/projects/kdesupport/strigi/strigi" + +LICENSE="GPL-2" +SLOT="0" +IUSE="clucene +dbus debug exif fam ffmpeg hyperestraier inotify log +qt4 test" + +COMMONDEPEND=" + app-arch/bzip2:0 + dev-libs/boost + dev-libs/libxml2:2 + sys-libs/zlib:0 + virtual/libiconv + clucene? ( >=dev-cpp/clucene-0.9.21[-debug] ) + dbus? ( + sys-apps/dbus + qt4? ( x11-libs/qt-dbus:4 ) + ) + exif? ( >=media-gfx/exiv2-0.17 ) + fam? ( virtual/fam ) + ffmpeg? ( virtual/ffmpeg ) + hyperestraier? ( app-text/hyperestraier ) + log? ( >=dev-libs/log4cxx-0.10.0 ) + qt4? ( + x11-libs/qt-core:4 + x11-libs/qt-gui:4 + ) +" +DEPEND="${COMMONDEPEND} + test? ( dev-util/cppunit )" +RDEPEND="${COMMONDEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-0.7.5-no-qt4.patch" + "${FILESDIR}/${PN}-0.7.6-crash.patch" +) + +src_configure() { + # Enabled: POLLING (only reliable way to check for files changed.) + # Disabled: xine - recommended upstream to keep it this way + mycmakeargs=( + -DENABLE_POLLING=ON + -DFORCE_DEPS=ON + -DENABLE_CPPUNIT=OFF + -DENABLE_REGENERATEXSD=OFF + -DENABLE_XINE=OFF + $(cmake-utils_use_enable clucene) + $(cmake-utils_use_enable dbus) + $(cmake-utils_use_enable exif EXIV2) + $(cmake-utils_use_enable fam) + $(cmake-utils_use_enable ffmpeg) + $(cmake-utils_use_enable hyperestraier) + $(cmake-utils_use_enable inotify) + $(cmake-utils_use_enable log LOG4CXX) + $(cmake-utils_use_enable qt4) + $(cmake-utils_use_enable test CPPUNIT) + ) + + if use qt4; then + mycmakeargs+=(-DENABLE_DBUS=ON) + fi + + cmake-utils_src_configure +} + +pkg_postinst() { + if ! use clucene && ! use hyperestraier; then + echo + elog "Because you didn't enable either of the available backends:" + elog "clucene or hyperestraier, strigi may not be functional." + elog "If you intend to use standalone strigi indexer (not needed for KDE)," + elog "be sure to reinstall app-misc/strigi with either clucene (recommended)" + elog "or hyperestraier (unreliable) USE flag enabled." + echo + fi +} -- 2.26.2