summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared H.Hudson <jhhudso@gentoo.org>2004-01-23 08:03:53 +0000
committerJared H.Hudson <jhhudso@gentoo.org>2004-01-23 08:03:53 +0000
commitcf9a4490f0f28ed40bbdaef7acd8e244219d1c14 (patch)
tree709734c1ba09de7f07b80b9520b498a794915b55 /sys-apps/file
parentInitial import. Thanks to Alexander Kellett <lypanov@kde.org> for contributin... (diff)
downloadhistorical-cf9a4490f0f28ed40bbdaef7acd8e244219d1c14.tar.gz
historical-cf9a4490f0f28ed40bbdaef7acd8e244219d1c14.tar.bz2
historical-cf9a4490f0f28ed40bbdaef7acd8e244219d1c14.zip
Added patch to fix endless loop (100% cpu usage) bug found when file'ing certain elf bins (source change found within debian patch)
Diffstat (limited to 'sys-apps/file')
-rw-r--r--sys-apps/file/ChangeLog10
-rw-r--r--sys-apps/file/Manifest17
-rw-r--r--sys-apps/file/file-4.07-r1.ebuild59
-rw-r--r--sys-apps/file/files/digest-file-4.07-r11
-rw-r--r--sys-apps/file/files/file-4.07-gentoo.diff22
5 files changed, 101 insertions, 8 deletions
diff --git a/sys-apps/file/ChangeLog b/sys-apps/file/ChangeLog
index 5cf52c2ab7d3..f9597cd1d5c3 100644
--- a/sys-apps/file/ChangeLog
+++ b/sys-apps/file/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/file
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.33 2004/01/22 23:54:16 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.34 2004/01/23 08:03:53 jhhudso Exp $
+
+*file-4.07-r1 (23 Jan 2004)
+
+ 23 Jan 2004; Jared Hudson <jhhudso@gentoo.org> : Added a patch from source
+ changes found in the debian file package. This fixes a serious (IMO) bug
+ that causes a endless loop (100% cpu usage) when using file against certain
+ elf binaries.
+
22 Jan 2004; <gustavoz@gentoo.org> file-4.06.ebuild:
marked stable on sparc
diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index 3860f05755c9..45f39d362a95 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -1,13 +1,16 @@
MD5 864d9d78ae48573d790cc598fcc4bc40 file-3.41.ebuild 1025
-MD5 3123ca22cdad98cdce0c4534f8ef853d file-4.07.ebuild 1577
-MD5 d016cfb89bfb6eec8ff142eea3a2306d file-4.02.ebuild 1027
+MD5 b2a1e476474b4a764287c07d85635b32 file-4.07-r1.ebuild 1622
MD5 37f50863e17fc2a610b45fc15e0696ad file-4.06.ebuild 1563
-MD5 d266351359f734d8cca691d0aa09761c ChangeLog 5090
+MD5 d016cfb89bfb6eec8ff142eea3a2306d file-4.02.ebuild 1027
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
-MD5 aff834708f034a4995abba4192e79583 files/file-3.39-gentoo.diff 4673
-MD5 aff834708f034a4995abba4192e79583 files/file-3.41-mips-gentoo.diff 4673
-MD5 eabc698678353b52ea7d9bfb724d4e1e files/digest-file-3.41 268
+MD5 93a3354831a106043d527ce6b468c1ad ChangeLog 5366
+MD5 3123ca22cdad98cdce0c4534f8ef853d file-4.07.ebuild 1577
MD5 fd38ae2f761ce496f7caedf3226166ae files/digest-file-4.02 61
-MD5 50700bf6bff49778fd8c6083466a0813 files/digest-file-4.06 61
MD5 ea5caf65874cda8c3f3d5baace9c73f8 files/digest-file-4.07 61
+MD5 8153e3726c4dad50b53c76eaf32b4833 files/file-4.07-gentoo.diff 648
+MD5 eabc698678353b52ea7d9bfb724d4e1e files/digest-file-3.41 268
MD5 8f6cec8c0754678a2817139182637eac files/file-4.xx-mips-gentoo.diff 13035
+MD5 ea5caf65874cda8c3f3d5baace9c73f8 files/digest-file-4.07-r1 61
+MD5 50700bf6bff49778fd8c6083466a0813 files/digest-file-4.06 61
+MD5 aff834708f034a4995abba4192e79583 files/file-3.39-gentoo.diff 4673
+MD5 aff834708f034a4995abba4192e79583 files/file-3.41-mips-gentoo.diff 4673
diff --git a/sys-apps/file/file-4.07-r1.ebuild b/sys-apps/file/file-4.07-r1.ebuild
new file mode 100644
index 000000000000..5efb8f6989a7
--- /dev/null
+++ b/sys-apps/file/file-4.07-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/file-4.07-r1.ebuild,v 1.1 2004/01/23 08:03:53 jhhudso Exp $
+
+inherit flag-o-matic gnuconfig
+
+DESCRIPTION="Program to identify a file's format by scanning binary data for patterns"
+SRC_URI="ftp://ftp.gw.com/mirrors/pub/unix/file/${P}.tar.gz
+ ftp://ftp.astron.com/pub/file/${P}.tar.gz"
+HOMEPAGE="ftp://ftp.astron.com/pub/file/"
+
+KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~arm ~alpha ~hppa ~mips ~ia64 ~ppc64"
+SLOT="0"
+LICENSE="as-is"
+IUSE=""
+
+DEPEND="virtual/glibc"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/${PN}-4.07-gentoo.diff
+
+ # (12 Oct 2003) <kumba@gentoo.org>
+ # This patch is for MIPS only. It slightly changes the 'file' output
+ # on MIPS machines to a specific format so that other programs can
+ # recognize things.
+ if [ "${ARCH}" = "mips" ]; then
+ epatch ${FILESDIR}/${PN}-4.xx-mips-gentoo.diff
+ fi
+}
+
+src_compile() {
+
+ # If running mips64, we need updated configure data
+ use mips && gnuconfig_update
+
+ # file command segfaults on hppa - reported by gustavo@zacarias.com.ar
+ [ ${ARCH} = "hppa" ] && filter-flags "-mschedule=8000"
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --datadir=/usr/share/misc \
+ --host=${CHOST} || die
+
+ # Buggy Makefiles. This fixes bug 31356
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die "make install failed"
+
+ if [ -z "`use build`" ] ; then
+ dodoc ChangeLog LEGAL.NOTICE MAINT README || die "dodoc failed"
+ else
+ rm -rf ${D}/usr/share/man
+ fi
+}
diff --git a/sys-apps/file/files/digest-file-4.07-r1 b/sys-apps/file/files/digest-file-4.07-r1
new file mode 100644
index 000000000000..1b7bd6525c18
--- /dev/null
+++ b/sys-apps/file/files/digest-file-4.07-r1
@@ -0,0 +1 @@
+MD5 ecfbf092c2c19119d9386e668f890954 file-4.07.tar.gz 355647
diff --git a/sys-apps/file/files/file-4.07-gentoo.diff b/sys-apps/file/files/file-4.07-gentoo.diff
new file mode 100644
index 000000000000..08d1de001687
--- /dev/null
+++ b/sys-apps/file/files/file-4.07-gentoo.diff
@@ -0,0 +1,22 @@
+diff -ru file-4.07.orig/src/readelf.c file-4.07/src/readelf.c
+--- file-4.07.orig/src/readelf.c 2003-11-18 13:42:33.000000000 -0600
++++ file-4.07/src/readelf.c 2004-01-23 01:47:00.325387536 -0600
+@@ -260,7 +260,8 @@
+ break;
+ offset = donote(ms, nbuf, offset, (size_t)bufsize,
+ class, swap, 4);
+-
++ if (offset == 0)
++ break; /* or loop for ever */
+ }
+ }
+ return 0;
+@@ -633,6 +634,8 @@
+ break;
+ offset = donote(ms, nbuf, offset,
+ (size_t)bufsize, class, swap, ph_align);
++ if (offset == 0)
++ break; /* or loop for ever */
+ }
+ if (lseek(fd, savedoffset + offset, SEEK_SET)
+ == (off_t)-1) {