From d065e7e407b07589b99267392e7d24f351439566 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 7 Apr 2007 10:04:55 +0000 Subject: [PATCH] Workaround from upstream for crappy regex handling in newer glibcs #173368. Package-Manager: portage-2.1.2.3 --- sys-apps/file/ChangeLog | 8 ++- sys-apps/file/Manifest | 25 +++++-- sys-apps/file/file-4.20-r1.ebuild | 65 +++++++++++++++++++ sys-apps/file/files/digest-file-4.20-r1 | 6 ++ .../file/files/file-4.20-disable-regex.patch | 16 +++++ 5 files changed, 112 insertions(+), 8 deletions(-) create mode 100644 sys-apps/file/file-4.20-r1.ebuild create mode 100644 sys-apps/file/files/digest-file-4.20-r1 create mode 100644 sys-apps/file/files/file-4.20-disable-regex.patch diff --git a/sys-apps/file/ChangeLog b/sys-apps/file/ChangeLog index 697812d1b2e9..ab2c588677f4 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.135 2007/03/25 18:04:11 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/file/ChangeLog,v 1.136 2007/04/07 10:04:55 vapier Exp $ + +*file-4.20-r1 (07 Apr 2007) + + 07 Apr 2007; Mike Frysinger + +files/file-4.20-disable-regex.patch, +file-4.20-r1.ebuild: + Workaround from upstream for crappy regex handling in newer glibcs #173368. 25 Mar 2007; Mike Frysinger file-4.20.ebuild: Grab patch from upstream for non-portable regex flag #172146. diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest index 26dd95fa4c1f..a9448a02195c 100644 --- a/sys-apps/file/Manifest +++ b/sys-apps/file/Manifest @@ -21,6 +21,10 @@ AUX file-4.19-wcwidth.patch 219 RMD160 702d913b8b124eac9a1ffd6733720fcddbe16b4d MD5 df35478eb129e3863a9add5ada88d291 files/file-4.19-wcwidth.patch 219 RMD160 702d913b8b124eac9a1ffd6733720fcddbe16b4d files/file-4.19-wcwidth.patch 219 SHA256 d2a4479f13b8adb7a02d805696983e75471cdb8c20eb2f3198e4e5fe248ddbd0 files/file-4.19-wcwidth.patch 219 +AUX file-4.20-disable-regex.patch 638 RMD160 c70bfd868ee4339360e0cc6ea12e58c1b91bccb4 SHA1 65b42c3f4e63e39539f64f4f00fa53a18301ab99 SHA256 80b7010cd9e62daf6f7dd34e3424669223868ad59bab09c0a6767f2e922a7e9e +MD5 5f9312c7f56e19cf995c2713ffc89834 files/file-4.20-disable-regex.patch 638 +RMD160 c70bfd868ee4339360e0cc6ea12e58c1b91bccb4 files/file-4.20-disable-regex.patch 638 +SHA256 80b7010cd9e62daf6f7dd34e3424669223868ad59bab09c0a6767f2e922a7e9e files/file-4.20-disable-regex.patch 638 AUX misc.magic 71 RMD160 047771fe06c524610e832fbb11a97e2c4915376b SHA1 b20abc4bfdccaf4cf43ff047361e75e0999553e7 SHA256 d1eae7e2b67739581d9aa5cc57ea78368b9c82f02cf07422ab1ce2ad575b03b7 MD5 a952f0eca26a046e4b815529d2b734ef files/misc.magic 71 RMD160 047771fe06c524610e832fbb11a97e2c4915376b files/misc.magic 71 @@ -36,14 +40,18 @@ EBUILD file-4.19.ebuild 1368 RMD160 afe96926cb31b625d77f0b155655e7ff0278573b SHA MD5 31608bb46cc53c56cdf3ed6eac024359 file-4.19.ebuild 1368 RMD160 afe96926cb31b625d77f0b155655e7ff0278573b file-4.19.ebuild 1368 SHA256 103654e856a1d0564ac1073601a2da420116cfd42b7d1b17403f79dc845aa242 file-4.19.ebuild 1368 +EBUILD file-4.20-r1.ebuild 1792 RMD160 2a89b70adbdf671f802010fc3174025959e4657d SHA1 783b4062bfc507ff78abb1d087fdb18ed5f1826d SHA256 9edd7360bf2c33ea3df4161445ca1646173b7029df20ff0905a9459f3fd3f3fb +MD5 aebcf94559dada0f0d39d77825b378d0 file-4.20-r1.ebuild 1792 +RMD160 2a89b70adbdf671f802010fc3174025959e4657d file-4.20-r1.ebuild 1792 +SHA256 9edd7360bf2c33ea3df4161445ca1646173b7029df20ff0905a9459f3fd3f3fb file-4.20-r1.ebuild 1792 EBUILD file-4.20.ebuild 1729 RMD160 28b4777073d2c3fe69b48b5db78278a219d0efaa SHA1 730f76a7e2ded0b120d72647ccd4653d1535fa3e SHA256 020ee8a4150734b5b54f0ab0109db5cd32a3fe91d6b999ba1a65b4b1a87e6266 MD5 889f115bb9f57b259067ae2d7cf1d45d file-4.20.ebuild 1729 RMD160 28b4777073d2c3fe69b48b5db78278a219d0efaa file-4.20.ebuild 1729 SHA256 020ee8a4150734b5b54f0ab0109db5cd32a3fe91d6b999ba1a65b4b1a87e6266 file-4.20.ebuild 1729 -MISC ChangeLog 16101 RMD160 8b07226bdecdd0ceab9457deef9df4842dc340a6 SHA1 0c472516cd68ab6e3abf9ba37780907b9d6aee71 SHA256 0298fe694900e23f81d823346a50294120977a20ef5e38f909a7f459b002b5a2 -MD5 8713db8164c1d830c002659253c5656b ChangeLog 16101 -RMD160 8b07226bdecdd0ceab9457deef9df4842dc340a6 ChangeLog 16101 -SHA256 0298fe694900e23f81d823346a50294120977a20ef5e38f909a7f459b002b5a2 ChangeLog 16101 +MISC ChangeLog 16321 RMD160 54c55c1c8963336f42522d3fcf3f86aab3152468 SHA1 a94882cac6cf66f942338fc5c77db1121a1b0066 SHA256 4c98221a38bd9bc50717a811ea3d4b82cdff4bfce73176e048205b9772a89ee9 +MD5 858ea9dc1d5133530d10519556b28fcb ChangeLog 16321 +RMD160 54c55c1c8963336f42522d3fcf3f86aab3152468 ChangeLog 16321 +SHA256 4c98221a38bd9bc50717a811ea3d4b82cdff4bfce73176e048205b9772a89ee9 ChangeLog 16321 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164 @@ -57,10 +65,13 @@ SHA256 03615d11f17c1aa0b2abbe73afd5788082368c641678e2b36e320aecb4c90313 files/di MD5 9c2718a04b0e390a5c07b0a04b0d8302 files/digest-file-4.20 473 RMD160 8b41b9719c079c8a152ba589448066766c881cee files/digest-file-4.20 473 SHA256 84f57e5b1daeada3ebfe1d7f6722ed6980119222741f01257d494354d62d1d82 files/digest-file-4.20 473 +MD5 9c2718a04b0e390a5c07b0a04b0d8302 files/digest-file-4.20-r1 473 +RMD160 8b41b9719c079c8a152ba589448066766c881cee files/digest-file-4.20-r1 473 +SHA256 84f57e5b1daeada3ebfe1d7f6722ed6980119222741f01257d494354d62d1d82 files/digest-file-4.20-r1 473 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (GNU/Linux) -iD8DBQFGF2wr8bi6rjpTunYRAvzsAKCof5zM0U7bSOUZ/WMotilbg/VX1gCgxXaF -75UUI7GzZaibuovlcipAUvo= -=9LtJ +iD8DBQFGF2zf8bi6rjpTunYRAlU7AKDE4qkFI+EfWN/1xIZRnid17Bl9wgCgvhlw +BBSAQ8mtSdLh38IBOQNfv40= +=CU5L -----END PGP SIGNATURE----- diff --git a/sys-apps/file/file-4.20-r1.ebuild b/sys-apps/file/file-4.20-r1.ebuild new file mode 100644 index 000000000000..2e2b7f75b949 --- /dev/null +++ b/sys-apps/file/file-4.20-r1.ebuild @@ -0,0 +1,65 @@ +# 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.20-r1.ebuild,v 1.1 2007/04/07 10:04:55 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 + ftp://ftp.gw.com/mirrors/pub/unix/file/patch-4.20-REG_STARTEND" + +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" +RESTRICT="mirror" #171924 + +DEPEND="" + +src_unpack() { + unpack ${P}.tar.gz + cd "${S}"/src + epatch "${DISTDIR}"/patch-4.20-REG_STARTEND + cd "${S}" + + epatch "${FILESDIR}"/${PN}-4.15-libtool.patch #99593 + epatch "${FILESDIR}"/${PN}-4.19-init-file.patch #163948 + epatch "${FILESDIR}"/${PN}-4.20-disable-regex.patch #173368 + sed -i -e 's:__unused:file_gcc_unused:' src/file.[ch] #171178 + + 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.20-r1 b/sys-apps/file/files/digest-file-4.20-r1 new file mode 100644 index 000000000000..8ecf19e146e2 --- /dev/null +++ b/sys-apps/file/files/digest-file-4.20-r1 @@ -0,0 +1,6 @@ +MD5 402bdb26356791bd5d277099adacc006 file-4.20.tar.gz 548393 +RMD160 ff4f1a677a6377df3d7925ab4e36fec71dd3ebe7 file-4.20.tar.gz 548393 +SHA256 c0810fb3ddb6cb73c9ff045965e542af6e3eaa7f2995b3037181766d26d5e6e7 file-4.20.tar.gz 548393 +MD5 119b5fd6c60eede06ef909aa13fd65d2 patch-4.20-REG_STARTEND 1119 +RMD160 30ca934188bafe6fbe3967c1aee980bd7710b0b1 patch-4.20-REG_STARTEND 1119 +SHA256 add836395ad07c2b60697eb5f9b24a2dbf26746c7b4b18330afe4ca147b759e2 patch-4.20-REG_STARTEND 1119 diff --git a/sys-apps/file/files/file-4.20-disable-regex.patch b/sys-apps/file/files/file-4.20-disable-regex.patch new file mode 100644 index 000000000000..61ff5501c26e --- /dev/null +++ b/sys-apps/file/files/file-4.20-disable-regex.patch @@ -0,0 +1,16 @@ +http://mx.gw.com/pipermail/file/2007/000172.html +http://bugs.gentoo.org/173368 + +--- magic/Magdir/msdos ++++ magic/Magdir/msdos +@@ -14,8 +14,8 @@ + + # OS/2 batch files are REXX. the second regex is a bit generic, oh well + # the matched commands seem to be common in REXX and uncommon elsewhere +-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 ++# 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 -- 2.26.2