Make sure unzip isnt built with an executable stack.
authorMike Frysinger <vapier@gentoo.org>
Tue, 4 Oct 2005 23:01:07 +0000 (23:01 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 4 Oct 2005 23:01:07 +0000 (23:01 +0000)
Package-Manager: portage-2.0.51.22-r2

app-arch/unzip/ChangeLog
app-arch/unzip/Manifest
app-arch/unzip/files/digest-unzip-5.52-r1 [new file with mode: 0644]
app-arch/unzip/files/unzip-5.52-no-exec-stack.patch [new file with mode: 0644]
app-arch/unzip/unzip-5.52-r1.ebuild [new file with mode: 0644]

index 3a2a5e80b638fbc3df53c0c8ce7c2ddb09b83a24..ae308f8140e65294d8438c96ef64682d1175c331 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for app-arch/unzip
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/unzip/ChangeLog,v 1.34 2005/09/09 15:11:23 agriffis Exp $
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/unzip/ChangeLog,v 1.35 2005/10/04 23:01:07 vapier Exp $
+
+*unzip-5.52-r1 (04 Oct 2005)
+
+  04 Oct 2005; Mike Frysinger <vapier@gentoo.org>
+  +files/unzip-5.52-no-exec-stack.patch, +unzip-5.52-r1.ebuild:
+  Make sure unzip isnt built with an executable stack.
 
   09 Sep 2005; Aron Griffis <agriffis@gentoo.org> unzip-5.52.ebuild:
   Mark 5.52 stable on alpha
index 607e7497287043f8903e5c8355330f11615417f5..a82fc31b82d989019b3dce4aa21756ee5260ddaf 100644 (file)
@@ -1,7 +1,20 @@
-MD5 4c9cca80bd3bde938e8921913622b498 unzip-5.50-r2.ebuild 1129
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 889185ece3718e537769c23672bd5ef1 unzip-5.52-r1.ebuild 1271
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
-MD5 00818fffd777ef5d5dae0e12e1869283 ChangeLog 3835
 MD5 1e8a4d870c17ebc47a8e57a438823739 unzip-5.52.ebuild 1193
+MD5 4c9cca80bd3bde938e8921913622b498 unzip-5.50-r2.ebuild 1129
+MD5 8a3d6aa629908a6bd7c2374fc23cec9a ChangeLog 4033
+MD5 583a5d8bbc70fb1d858c5e40d686e8ce files/digest-unzip-5.50-r2 61
+MD5 96a480a7d42cba427e44955d142d670c files/digest-unzip-5.52-r1 61
+MD5 b17d0181200f3e1f47a55b54eb93527d files/unzip-5.52-no-exec-stack.patch 334
 MD5 96a480a7d42cba427e44955d142d670c files/digest-unzip-5.52 61
 MD5 3b01796cbe10d9492bd8c0825bc83544 files/unzip-5.50-dotdot.patch 3236
-MD5 583a5d8bbc70fb1d858c5e40d686e8ce files/digest-unzip-5.50-r2 61
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDQwoLgIKl8Uu19MoRAnQYAJ99p7O4/eLtcSn9K2G0+mrkt6aePQCffru+
+hsbXINrgenQxI3ClPQ/k09E=
+=p6Vs
+-----END PGP SIGNATURE-----
diff --git a/app-arch/unzip/files/digest-unzip-5.52-r1 b/app-arch/unzip/files/digest-unzip-5.52-r1
new file mode 100644 (file)
index 0000000..1115e1a
--- /dev/null
@@ -0,0 +1 @@
+MD5 9d23919999d6eac9217d1f41472034a9 unzip552.tar.gz 1140291
diff --git a/app-arch/unzip/files/unzip-5.52-no-exec-stack.patch b/app-arch/unzip/files/unzip-5.52-no-exec-stack.patch
new file mode 100644 (file)
index 0000000..cd40a8c
--- /dev/null
@@ -0,0 +1,13 @@
+Make sure that the asm files don't incorrectly trigger an executable
+stack marking in the final shared library.  That's bad, mmmkay.
+
+--- unzip/crc_i386.S
++++ unzip/crc_i386.S
+@@ -238,3 +238,7 @@
+ #endif /* i386 || _i386 || _I386 || __i386 */
+ 
+ #endif /* !USE_ZLIB */
++
++#ifdef __ELF__
++.section .note.GNU-stack,"",@progbits
++#endif
diff --git a/app-arch/unzip/unzip-5.52-r1.ebuild b/app-arch/unzip/unzip-5.52-r1.ebuild
new file mode 100644 (file)
index 0000000..4a2795f
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/unzip/unzip-5.52-r1.ebuild,v 1.1 2005/10/04 23:01:07 vapier Exp $
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Unzipper for pkzip-compressed files"
+HOMEPAGE="ftp://ftp.info-zip.org/pub/infozip/UnZip.html"
+SRC_URI="ftp://ftp.info-zip.org/pub/infozip/src/${PN}${PV/.}.tar.gz"
+
+LICENSE="Info-ZIP"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+DEPEND=""
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       epatch "${FILESDIR}"/${P}-no-exec-stack.patch
+       append-lfs-flags #104315
+       sed -i \
+               -e "s:-O3:${CFLAGS}:" \
+               -e "s:CC=gcc :CC=$(tc-getCC) :" \
+               -e "s:LD=gcc :LD=$(tc-getCC) :" \
+               -e "s:-O :${CFLAGS} :" \
+               -e "s:LF2 = -s:LF2 = :" \
+               unix/Makefile \
+               || die "sed unix/Makefile failed"
+}
+
+src_compile() {
+       local TARGET
+       use x86 \
+               && TARGET=linux_asm \
+               || TARGET=linux_noasm
+       use userland_Darwin && TARGET=macosx
+       emake -f unix/Makefile ${TARGET} || die "emake failed"
+}
+
+src_install() {
+       dobin unzip funzip unzipsfx unix/zipgrep || die "dobin failed"
+       dosym unzip /usr/bin/zipinfo
+       doman man/*.1
+       dodoc BUGS History* README ToDo WHERE
+}