summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-07-11 05:51:07 +0000
committerMike Frysinger <vapier@gentoo.org>2007-07-11 05:51:07 +0000
commitf1d4bc8088c694cb3453746609e51efad760a63e (patch)
tree8652cf9464c848159d5228c2069c74631b93e7fe /sys-apps
parentwhitespace (diff)
downloadgentoo-2-f1d4bc8088c694cb3453746609e51efad760a63e.tar.gz
gentoo-2-f1d4bc8088c694cb3453746609e51efad760a63e.tar.bz2
gentoo-2-f1d4bc8088c694cb3453746609e51efad760a63e.zip
Punt resource hogging regex #174217.
(Portage version: 2.1.3_rc7)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/file/ChangeLog8
-rw-r--r--sys-apps/file/file-4.21-r1.ebuild59
-rw-r--r--sys-apps/file/files/digest-file-4.21-r13
-rw-r--r--sys-apps/file/files/file-4.21-disable-regex.patch18
4 files changed, 87 insertions, 1 deletions
diff --git a/sys-apps/file/ChangeLog b/sys-apps/file/ChangeLog
index 4accc35d7df0..e2a8d2be8d11 100644
--- a/sys-apps/file/ChangeLog
+++ b/sys-apps/file/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-apps/file
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.144 2007/06/02 00:47:00 kumba Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.145 2007/07/11 05:51:07 vapier Exp $
+
+*file-4.21-r1 (11 Jul 2007)
+
+ 11 Jul 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/file-4.21-disable-regex.patch, +file-4.21-r1.ebuild:
+ Punt resource hogging regex #174217.
02 Jun 2007; Joshua Kinard <kumba@gentoo.org> file-4.21.ebuild:
Stable on mips, per #179583.
diff --git a/sys-apps/file/file-4.21-r1.ebuild b/sys-apps/file/file-4.21-r1.ebuild
new file mode 100644
index 000000000000..4c71a28c6b89
--- /dev/null
+++ b/sys-apps/file/file-4.21-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-4.21-r1.ebuild,v 1.1 2007/07/11 05:51:07 vapier Exp $
+
+inherit eutils distutils libtool flag-o-matic
+
+DESCRIPTION="identify a file's format by scanning binary data for patterns"
+HOMEPAGE="ftp://ftp.astron.com/pub/file/"
+SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz
+ ftp://ftp.gw.com/mirrors/pub/unix/file/${P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 m68k ~mips ~ppc ~ppc64 s390 sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="python"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-4.15-libtool.patch #99593
+ epatch "${FILESDIR}"/${P}-disable-regex.patch #174217
+
+ elibtoolize
+ epunt_cxx
+
+ # make sure python links against the current libmagic #54401
+ sed -i "/library_dirs/s:'\.\./src':'../src/.libs':" python/setup.py
+
+ # dont let python README kill main README #60043
+ mv python/README{,.python}
+}
+
+src_compile() {
+ # file uses things like strndup() and wcwidth()
+ append-flags -D_GNU_SOURCE
+
+ econf --datadir=/usr/share/misc || die
+ emake || die "emake failed"
+
+ use python && cd python && distutils_src_compile
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+ dodoc ChangeLog MAINT README
+
+ use python && cd python && distutils_src_install
+}
+
+pkg_postinst() {
+ use python && distutils_pkg_postinst
+}
+
+pkg_postrm() {
+ use python && distutils_pkg_postrm
+}
diff --git a/sys-apps/file/files/digest-file-4.21-r1 b/sys-apps/file/files/digest-file-4.21-r1
new file mode 100644
index 000000000000..b206200b67af
--- /dev/null
+++ b/sys-apps/file/files/digest-file-4.21-r1
@@ -0,0 +1,3 @@
+MD5 9e3503116f4269a1be70220ee2234b0e file-4.21.tar.gz 549938
+RMD160 c8cfee27ba7a033bae355e458921eac39913b1e0 file-4.21.tar.gz 549938
+SHA256 6f5644d56cc603138533158076a6cb41cd33c33d27e5310cb76cb6576151ca67 file-4.21.tar.gz 549938
diff --git a/sys-apps/file/files/file-4.21-disable-regex.patch b/sys-apps/file/files/file-4.21-disable-regex.patch
new file mode 100644
index 000000000000..cc7af288f65d
--- /dev/null
+++ b/sys-apps/file/files/file-4.21-disable-regex.patch
@@ -0,0 +1,18 @@
+The new regex was added but the old one left in. Make sure to punt the old
+one for resource issues on glibc.
+
+http://bugs.gentoo.org/174217
+
+--- file-4.21/magic/Magdir/msdos
++++ file-4.21/magic/Magdir/msdos
+@@ -17,10 +17,6 @@
+ 100 regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text
+ 100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text
+
+-
+-100 regex/c =^\\s*call\\s+rxfuncadd.*sysloadfu OS/2 REXX batch file text
+-100 regex/c =^\\s*say\ ['"] OS/2 REXX batch file text
+-
+ 0 leshort 0x14c MS Windows COFF Intel 80386 object file
+ #>4 ledate x stamp %s
+ 0 leshort 0x166 MS Windows COFF MIPS R4000 object file