diff options
author | Ryan Hill <rhill@gentoo.org> | 2010-08-19 05:25:36 +0000 |
---|---|---|
committer | Ryan Hill <rhill@gentoo.org> | 2010-08-19 05:25:36 +0000 |
commit | aef8e9a4200bd87e252a0649dd9808903a6d329b (patch) | |
tree | 10a8c22acede7aed8d3991aef9771cd18bbcd69e /dev-lang | |
parent | x86 stable wrt bug #333199 (diff) | |
download | historical-aef8e9a4200bd87e252a0649dd9808903a6d329b.tar.gz historical-aef8e9a4200bd87e252a0649dd9808903a6d329b.tar.bz2 historical-aef8e9a4200bd87e252a0649dd9808903a6d329b.zip |
Fix buffer overflow with GCC 4.5 and -D_FORTIFY_SOURCE=2 (bug #317727 by
Diego).
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/tcl/ChangeLog | 9 | ||||
-rw-r--r-- | dev-lang/tcl/Manifest | 12 | ||||
-rw-r--r-- | dev-lang/tcl/files/tcl-8.5.8-fortify.patch | 16 | ||||
-rw-r--r-- | dev-lang/tcl/tcl-8.5.8-r2.ebuild | 113 |
4 files changed, 144 insertions, 6 deletions
diff --git a/dev-lang/tcl/ChangeLog b/dev-lang/tcl/ChangeLog index 179304d1ef24..e85badec3bca 100644 --- a/dev-lang/tcl/ChangeLog +++ b/dev-lang/tcl/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-lang/tcl # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcl/ChangeLog,v 1.120 2010/06/16 07:40:17 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcl/ChangeLog,v 1.121 2010/08/19 05:25:36 dirtyepic Exp $ + +*tcl-8.5.8-r2 (19 Aug 2010) + + 19 Aug 2010; Ryan Hill <dirtyepic@gentoo.org> +tcl-8.5.8-r2.ebuild, + +files/tcl-8.5.8-fortify.patch: + Fix buffer overflow with GCC 4.5 and -D_FORTIFY_SOURCE=2 (bug #317727 by + Diego). 16 Jun 2010; Justin Lecher <jlec@gentoo.org> tcl-8.5.8-r1.ebuild: Compile in src_compile, fix for 324201 diff --git a/dev-lang/tcl/Manifest b/dev-lang/tcl/Manifest index dbe532b285df..2a9715bdf6c5 100644 --- a/dev-lang/tcl/Manifest +++ b/dev-lang/tcl/Manifest @@ -5,6 +5,7 @@ AUX tcl-8.4.11-multilib.patch 1808 RMD160 fb26bcbc63a3fb79dc2793af35f64b4dc189fe AUX tcl-8.4.15-tclm4-soname.patch 477 RMD160 65326daf481e3ac425eb4ba9f9495dc122b7964a SHA1 7c664afeddfb3bf51fa52104cca047f6e421fcee SHA256 2130b8b5fdddadfca35b74e9432d2651733e4f1c7b13d66ffc87b6995865076b AUX tcl-8.4.16-multilib.patch 988 RMD160 b674f7c4c78a89b3435b2b04831f974992c5c369 SHA1 ea83b70443ede2d52a2ad35a3c5e74a666044693 SHA256 6df0027ee02c1f458e8ae5f07538e0838317d72d028c6e1af97e8433d866b0ce AUX tcl-8.4.9-strtod.patch 362 RMD160 90ece8fcccba20cf1bc758133bc072cd515ba090 SHA1 db6098d47f28b7a40cc329dce2cac4e742a956d8 SHA256 93fad4cd880492430d5d55730b96a12697a58e951d8145b2b66025bceca10386 +AUX tcl-8.5.8-fortify.patch 633 RMD160 2601056b5a92d5bb038ca81347de16ea1b650925 SHA1 4b8fa645df12f9c2538b7fa80763eab1dd3615c5 SHA256 c0d05495bc75c283acd631140eed61eec278f305637940398b1714c1e0570408 AUX tcl-8.5_alpha6-multilib.patch 830 RMD160 e99162cf85299e44137c87c482b9d27f767f38f0 SHA1 c9de5b434aa2b479557e6be4db5dbb62ebcb2fe8 SHA256 5686025ce4e685afcf06cafac591a91a5ccd10f952c422cf01b4f72263023d55 AUX tcl-8.5_alpha6-tclm4-soname.patch 486 RMD160 1795d442bf8ced0804d6aa364f628c545eb791f8 SHA1 9a7c9ed07eb1394c5ba16a8a41f9d47428414ac4 SHA256 af3c3ea0b0d6c37c666d2fb54cd9891c273c90ebaea4a4707583076faffb2925 AUX tcl-configure-LANG.patch 1686 RMD160 4ff8355af81705058fd411910dfae94887bcd884 SHA1 67ae0deff73689cb39cd6e7451262bdda9c25a39 SHA256 dc9386b88eac48c282d63d0be7e7be81d4a0a08035a8b97138a61133e057bcea @@ -18,13 +19,14 @@ EBUILD tcl-8.4.18.ebuild 3616 RMD160 0e692057dc06d804d2e135f3d9fd34592066a5a9 SH EBUILD tcl-8.4.19.ebuild 3627 RMD160 7abc5e056c8b826e8a2c5c0831098136e7970249 SHA1 048455a731e94bfa9c0e7a00a05bee293983e3e9 SHA256 69a6c8f859a0b618ad2efcbe46fbdb2a02603787c56ec0728a6962d3ac7a0839 EBUILD tcl-8.5.7.ebuild 3293 RMD160 446a3decdb73bdafebceafae2307b4bd8cfa3254 SHA1 a36ffa5cd1ac5f46b4843cff91626b39724c4339 SHA256 e8d85e915f11eb2fea254ae361e682cd929f57d3588cc495c67151357c675af9 EBUILD tcl-8.5.8-r1.ebuild 3577 RMD160 9bfb38b242da93722d8dca25a90a6483d3d05380 SHA1 d455f6e3e23d6ecbca3427fc6ad4d84f67655efe SHA256 75942b89ffb236cdc08005ff0f00302e94c6326d528018467cc1013fec3b9174 +EBUILD tcl-8.5.8-r2.ebuild 3632 RMD160 0e92e41c7d29c8fa3687d3b89e211be27ef47c94 SHA1 8e7bc9ec391dcef7fca81aa6111c412eb46501ad SHA256 dc3c25450c6307a79906555acd77e97b61366bda66b1aa1b812a023ebc1d6e84 EBUILD tcl-8.5.8.ebuild 3304 RMD160 7dc5371797c0d561ab06732a68e0f61e8042b174 SHA1 5e27053d4a9b289dc0f1f81a2b6e9011cfb4d963 SHA256 c986c410052bd0bba1bc100e67e2c404d6452f83c96446f4f7209bdb909e3933 -MISC ChangeLog 15171 RMD160 35a5548da11ee9cc8140847b1ca867b673b5ad6a SHA1 53c4a0ea83c1d095acd2d11fdda1703ad7e4c9e5 SHA256 688b5e5068ff71f39134ed0186d88f51d1f5fb5a0ee415c95b49ed84e6067324 +MISC ChangeLog 15395 RMD160 3259a5ed643cff4f8f785e61834e0d3e97b6aa0a SHA1 fd6912fb91cd2211e4fd77c6ab11e1bcc1fcb8b5 SHA256 77e561c8ca5b731944ec01f0d8af05860a3ff732cde23f5337a2197eb3ea25ab MISC metadata.xml 264 RMD160 6318855997b3e957f4ad5c59677534993e352c34 SHA1 19fe5fc86133d09d7fcb0b2ce44054eff4fff028 SHA256 01ce19dabf2e53a73d86e4b16f653c6cd2b6c9aca1b79ec095f353315c8b84ee -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.15 (GNU/Linux) +Version: GnuPG v2.0.16 (GNU/Linux) -iEYEARECAAYFAkwYf+gACgkQgAnW8HDreRaxeQCgnp3jzZ9LEeI4T+IrtPy0xMI4 -t0AAn2OcHKPJ1HtgwNPhTedP+pK4mq06 -=Qi6P +iEYEARECAAYFAkxswUUACgkQiqiDRvmkBmI0LACgncs9/52iH+wSWDgQvSoAR5QU +keMAn3yyVHY0kNWVs6LTaigSzhpFkkPJ +=OIbz -----END PGP SIGNATURE----- diff --git a/dev-lang/tcl/files/tcl-8.5.8-fortify.patch b/dev-lang/tcl/files/tcl-8.5.8-fortify.patch new file mode 100644 index 000000000000..0cfce74f0cc0 --- /dev/null +++ b/dev-lang/tcl/files/tcl-8.5.8-fortify.patch @@ -0,0 +1,16 @@ +Fix buffer overflow with GCC 4.5 -D_FORTIFY_SOURCE=2. +https://bugs.gentoo.org/317727 + +https://sourceforge.net/tracker/?func=detail&aid=3048354&group_id=10894&atid=310894 + +--- a/generic/tclTrace.c ++++ b/generic/tclTrace.c +@@ -909,7 +909,7 @@ TraceVariableObjCmd( + } + ctvarPtr->traceCmdInfo.length = length; + flags |= TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT; +- strcpy(ctvarPtr->traceCmdInfo.command, command); ++ memcpy(ctvarPtr->traceCmdInfo.command, command, length + 1); + ctvarPtr->traceInfo.traceProc = TraceVarProc; + ctvarPtr->traceInfo.clientData = (ClientData) + &ctvarPtr->traceCmdInfo; diff --git a/dev-lang/tcl/tcl-8.5.8-r2.ebuild b/dev-lang/tcl/tcl-8.5.8-r2.ebuild new file mode 100644 index 000000000000..f10ca9fe5640 --- /dev/null +++ b/dev-lang/tcl/tcl-8.5.8-r2.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcl/tcl-8.5.8-r2.ebuild,v 1.1 2010/08/19 05:25:36 dirtyepic Exp $ + +EAPI="3" + +inherit autotools eutils flag-o-matic multilib toolchain-funcs + +MY_P="${PN}${PV/_beta/b}" +DESCRIPTION="Tool Command Language" +HOMEPAGE="http://www.tcl.tk/" +SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris" +IUSE="debug threads" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use threads ; then + ewarn "" + ewarn "PLEASE NOTE: You are compiling ${P} with" + ewarn "threading enabled." + ewarn "Threading is not supported by all applications" + ewarn "that compile against tcl. You use threading at" + ewarn "your own discretion." + ewarn "" + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-8.5_alpha6-multilib.patch + + # Bug 125971 + epatch "${FILESDIR}"/${PN}-8.5_alpha6-tclm4-soname.patch + epatch "${FILESDIR}"/${P}-fortify.patch # 317727 + + cd "${S}"/unix + eautoreconf +} + +src_configure() { + # workaround stack check issues, bug #280934 + if use hppa; then + append-cflags "-DTCL_NO_STACK_CHECK=1" + fi + + tc-export CC + + cd "${S}"/unix + econf \ + $(use_enable threads) \ + $(use_enable debug symbols) || die +} + +src_compile() { + cd "${S}"/unix + emake || die +} + +src_install() { + #short version number + local v1 + v1=${PV%.*} + + cd "${S}"/unix + S= emake DESTDIR="${D}" install || die + + # fix the tclConfig.sh to eliminate refs to the build directory + local mylibdir=$(get_libdir) ; mylibdir=${mylibdir//\/} + sed -i \ + -e "s,^TCL_BUILD_LIB_SPEC='-L.*/unix,TCL_BUILD_LIB_SPEC='-L${EPREFIX}/usr/${mylibdir}," \ + -e "s,^TCL_SRC_DIR='.*',TCL_SRC_DIR='${EPREFIX}/usr/${mylibdir}/tcl${v1}/include'," \ + -e "s,^TCL_BUILD_STUB_LIB_SPEC='-L.*/unix,TCL_BUILD_STUB_LIB_SPEC='-L${EPREFIX}/usr/${mylibdir}," \ + -e "s,^TCL_BUILD_STUB_LIB_PATH='.*/unix,TCL_BUILD_STUB_LIB_PATH='${EPREFIX}/usr/${mylibdir}," \ + -e "s,^TCL_LIB_FILE='libtcl${v1}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${v1}\$\{TCL_DBGX\}.so\"," \ + "${ED}"/usr/${mylibdir}/tclConfig.sh || die + [[ ${CHOST} != *-darwin* ]] && sed -i \ + -e "s,^TCL_CC_SEARCH_FLAGS='\(.*\)',TCL_CC_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \ + -e "s,^TCL_LD_SEARCH_FLAGS='\(.*\)',TCL_LD_SEARCH_FLAGS='\1:${EPREFIX}/usr/${mylibdir}'," \ + "${ED}"/usr/${mylibdir}/tclConfig.sh + + # install private headers + insinto /usr/${mylibdir}/tcl${v1}/include/unix + doins "${S}"/unix/*.h || die + insinto /usr/${mylibdir}/tcl${v1}/include/generic + doins "${S}"/generic/*.h || die + rm -f "${ED}"/usr/${mylibdir}/tcl${v1}/include/generic/tcl.h + rm -f "${ED}"/usr/${mylibdir}/tcl${v1}/include/generic/tclDecls.h + rm -f "${ED}"/usr/${mylibdir}/tcl${v1}/include/generic/tclPlatDecls.h + + # install symlink for libraries + dosym libtcl${v1}.so /usr/${mylibdir}/libtcl.so || die + dosym libtclstub${v1}.a /usr/${mylibdir}/libtclstub.a || die + + dosym tclsh${v1} /usr/bin/tclsh || die + + cd "${S}" + dodoc ChangeLog* README changes || die +} + +pkg_postinst() { + ewarn + ewarn "If you're upgrading from <dev-lang/tcl-8.5, you must recompile the other" + ewarn "packages on your system that link with tcl after the upgrade" + ewarn "completes. To perform this action, please run revdep-rebuild" + ewarn "in package app-portage/gentoolkit." + ewarn "If you have dev-lang/tk and dev-tcltk/tclx installed you should" + ewarn "upgrade them before this recompilation, too," + ewarn +} |