diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/yacc |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/yacc')
-rw-r--r-- | dev-util/yacc/Manifest | 8 | ||||
-rw-r--r-- | dev-util/yacc/files/yacc-1.9.1-CVE-2008-3196.patch | 33 | ||||
-rw-r--r-- | dev-util/yacc/files/yacc-1.9.1-ia64.patch | 24 | ||||
-rw-r--r-- | dev-util/yacc/files/yacc-1.9.1-mkstemp.patch | 15 | ||||
-rw-r--r-- | dev-util/yacc/metadata.xml | 7 | ||||
-rw-r--r-- | dev-util/yacc/yacc-1.9.1-r6.ebuild | 61 |
6 files changed, 148 insertions, 0 deletions
diff --git a/dev-util/yacc/Manifest b/dev-util/yacc/Manifest new file mode 100644 index 000000000000..dd41f7e9f59c --- /dev/null +++ b/dev-util/yacc/Manifest @@ -0,0 +1,8 @@ +AUX yacc-1.9.1-CVE-2008-3196.patch 1199 SHA256 5bd7b40a6b600575d37ab0ee93a31cc5e6896c828884504d2aee5dc247fbc25e SHA512 7c636f5b6d98d4bf33b60ae1c49079fc849c35ca9f84e3277bafc58d9689c7b8021af34c3d7411d8637b1c821036105e73b6d5770241de72d5358718a052abf3 WHIRLPOOL c03f1a6ce34b5b22521acfe2ad42eb48b1c36d386acbe6344bc3aa6c22f6e21439c9495eb8818f98d139286a66c1f28bab2a4e944ea31401df65cf90e4485567 +AUX yacc-1.9.1-ia64.patch 504 SHA256 8bea1acbb1a2b225376df4c7b382dad05751b5fd073d1a3483a2c83e4ae4295a SHA512 6525f6c3f9d0011fea00781a24fb0f2d4f80a13835746d8ea8b05a762d789d5f17984da04f32178dbdd73ab098be38fe044bf108ed2e145888cf5ebfe84bb1ec WHIRLPOOL 666eecf30061b7a5282d2553b17fb5d97ba01df8cfd56aa18b3d9cac25760ad15c23ee80fde06dfb994bd108d61e4ab7a9b54c55a924c3d64ae6b90e7acbf71d +AUX yacc-1.9.1-mkstemp.patch 417 SHA256 9e17663bef7483f66400ae638d3dc57e65014ac864cd466f12e97a00ea4f3443 SHA512 c36d07d4fafc363fcb0173fc17cf4e37dfe20fcfe7df7faaa11d5cc47f9b933a4f192c55f738d1cdcf7f87ddb07311bbc54aa502d8e68b8e7831bf1daba8da03 WHIRLPOOL 80aee37d01db9adc70e89808327d1f1a8506e1effa52d6df3dd5fe3f6a324e1d4cdc4899f0aecfe222afeb1c537902d7229ec6c91de671b30509b25056724ad5 +DIST yacc-1.9.1.tar.Z 64805 SHA256 8a0f3faf78d0ada00eea5ffd1e141bb7a979d5d570a4c8a9a6ea57e5f3751477 SHA512 6adb51c5f07e8084a86688589f52d9eee0183fb4d77508e36621a6b0ba91a5c4195feb87db3401ec69560554f71f2f6984dec01266e41e0fd54fa72ef1780e80 WHIRLPOOL 91bcefbf56374559c83c40ff5c15303d6547c607aa0ab98eea2883dc78fd82d638d6638787eb89fa283cc19791bf9e1cc3041ecc435404b012d913ee04664560 +EBUILD yacc-1.9.1-r6.ebuild 1550 SHA256 64a0d399f0213df5c2f95919f9ef240671c5eda27bd453e74f37cb1d8527a8b8 SHA512 b3beb6e9a2fc0d09044bcf4cd4b22ac4496659e518633a0ca7caaec91f933405fbb06c0571ecd557fc8496e4940ef6f09b4b1368775210e4d3e7d53e9fee6af6 WHIRLPOOL c44b2f96f74bd87d1e5751a5e663b2924f190ff02561b095d095b7400a52799e995e5f29a2ce97401ed6c1d95574d2750c5e568d56bb515b9b08d19f59b21ccd +MISC ChangeLog 3800 SHA256 f8412c593d39b6872022f0b8bb72911fa6820b9ac23cbefcaac5a2cfbbdfa966 SHA512 1da5f76e41b3fd9d5a5a1e913ddbaf1b2fd348cdf924abe351cc31b31c8cb16fbb59126025c0183a1749f9aaa25a9295269f15f1bc4fd259d8acab000d77aeb4 WHIRLPOOL 141e80aaf170e67b5c4c44a843c1f1137ba7187d783dc1d63ab384e21c2bb3c8e21d049400aca12bd6e736887e355ffada020a429ddd4f3cb86d1b5fc2977369 +MISC ChangeLog-2015 3826 SHA256 eb040be53bb12023e21cc37871b0b425db30ddcf141466fbfdc47abca7b6adf1 SHA512 ea7f2dcde89a9b2a0c00ed18fb562dac75be8715cd795b88c5695686251894645375dde53ba9eb4d9b3fe61abb9eef6fc0db8ed19797cc674b567699e7d52ffc WHIRLPOOL cefa66658dcdff9c6f04760bb2ecc71b9e25313f08231bcca05a529099bd1bdb1bbfb50828d029fb0de261a24876720377d56a8d3823422144d38185cf8067c6 +MISC metadata.xml 220 SHA256 998ce4afb847c8594ee92e054f8a06ae3de375d38b2e400eebab911ebbad60a8 SHA512 1db105eebacb6c7d44fd17746981e6e24badb2e81327410aa935a7603379cfcc8f3cf27dcf4e9d870cea2f73f6a15cf052e3e785205095ea9a93d72980ff71cc WHIRLPOOL 23c78e4c05afc8a04239236928ca26e539b0a969f44389b90a34fef3f4a57f18d9db2838d3df439c482cd4b89ce8b959dde5e83500c44ebd2af453629ef79a3d diff --git a/dev-util/yacc/files/yacc-1.9.1-CVE-2008-3196.patch b/dev-util/yacc/files/yacc-1.9.1-CVE-2008-3196.patch new file mode 100644 index 000000000000..2fbb83cfc6b1 --- /dev/null +++ b/dev-util/yacc/files/yacc-1.9.1-CVE-2008-3196.patch @@ -0,0 +1,33 @@ +Tue Jul 8 15:06:50 2008 UTC by otto + +Fix an venerable bug: if we're reducing a rule that has an empty +right hand side and the yacc stackpointer is pointing at the very +end of the allocated stack, we end up accessing the stack out of +bounds by the implicit $$ = $1 action. Detected by my new malloc, +experienced by sturm@ on sparc64; ok deraadt@ + + +Index: yacc-1.9.1/skeleton.c +=================================================================== +--- yacc-1.9.1.orig/skeleton.c ++++ yacc-1.9.1/skeleton.c +@@ -18,6 +18,7 @@ char *banner[] = + "/*static char yysccsid[] = \"from: @(#)yaccpar 1.9 (Berkeley) 02/21/93\";*/", + "static char yyrcsid[] = \"$Id: yacc-1.9.1-CVE-2008-3196.patch,v 1.1 2008/10/04 18:57:18 rbu Exp $\";", + "#endif", ++ "#include <string.h>", + "#define YYBYACC 1", + "#define YYMAJOR 1", + "#define YYMINOR 9", +@@ -226,7 +227,10 @@ char *body[] = + " YYPREFIX, yystate, yyn, yyrule[yyn]);", + "#endif", + " yym = yylen[yyn];", +- " yyval = yyvsp[1-yym];", ++ " if (yym)", ++ " yyval = yyvsp[1-yym];", ++ " else", ++ " memset(&yyval, 0, sizeof yyval);", + " switch (yyn)", + " {", + 0 diff --git a/dev-util/yacc/files/yacc-1.9.1-ia64.patch b/dev-util/yacc/files/yacc-1.9.1-ia64.patch new file mode 100644 index 000000000000..c10e88541287 --- /dev/null +++ b/dev-util/yacc/files/yacc-1.9.1-ia64.patch @@ -0,0 +1,24 @@ +--- byacc-1.9/defs.h.busted Sat May 6 21:10:56 2000 ++++ byacc-1.9/defs.h Sat May 6 21:11:22 2000 +@@ -1,7 +1,8 @@ + #include <assert.h> + #include <ctype.h> + #include <stdio.h> +- ++#include <string.h> ++#include <stdlib.h> + + /* machine-dependent definitions */ + /* the following definitions are for the Tahoe */ +@@ -280,10 +281,3 @@ + extern int errno; + + +-/* system functions */ +- +-extern void free(); +-extern char *calloc(); +-extern char *malloc(); +-extern char *realloc(); +-extern char *strcpy(); + diff --git a/dev-util/yacc/files/yacc-1.9.1-mkstemp.patch b/dev-util/yacc/files/yacc-1.9.1-mkstemp.patch new file mode 100644 index 000000000000..5c72a6e9bc14 --- /dev/null +++ b/dev-util/yacc/files/yacc-1.9.1-mkstemp.patch @@ -0,0 +1,15 @@ +--- a/main.c.orig 2002-12-17 14:28:54.000000000 -0500 ++++ b/main.c 2002-12-17 14:29:31.000000000 -0500 +@@ -264,9 +264,9 @@ + text_file_name[len + 5] = 't'; + union_file_name[len + 5] = 'u'; + +- mktemp(action_file_name); +- mktemp(text_file_name); +- mktemp(union_file_name); ++ mkstemp(action_file_name); ++ mkstemp(text_file_name); ++ mkstemp(union_file_name); + + len = strlen(file_prefix); + diff --git a/dev-util/yacc/metadata.xml b/dev-util/yacc/metadata.xml new file mode 100644 index 000000000000..294c350c6960 --- /dev/null +++ b/dev-util/yacc/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>monsieurp@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-util/yacc/yacc-1.9.1-r6.ebuild b/dev-util/yacc/yacc-1.9.1-r6.ebuild new file mode 100644 index 000000000000..0462eee56053 --- /dev/null +++ b/dev-util/yacc/yacc-1.9.1-r6.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit toolchain-funcs + +DESCRIPTION="Yacc: Yet Another Compiler-Compiler" +HOMEPAGE="http://dinosaur.compilertools.net/#yacc" +SRC_URI="ftp://metalab.unc.edu/pub/Linux/devel/compiler-tools/${P}.tar.Z" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" + +PATCHES=( + # mkstemp patch from byacc ebuild. + "${FILESDIR}/${P}-mkstemp.patch" + + # The following patch fixes yacc to run correctly on ia64 (and + # other 64-bit arches). See bug 46233. + "${FILESDIR}/${P}-ia64.patch" + + # Avoid stack access error. See bug 232005. + "${FILESDIR}/${P}-CVE-2008-3196.patch" +) + +src_prepare() { + default + + # Use our CFLAGS and LDFLAGS. + sed -i -e 's: -O : $(CFLAGS) $(LDFLAGS) :' Makefile || die 'sed failed' +} + +src_compile() { + emake clean + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_install() { + dobin "${PN}" + doman "${PN}.1" + dodoc 00README* ACKNOWLEDGEMENTS NEW_FEATURES NO_WARRANTY NOTES README* +} + +pkg_preinst() { + # bison installs a /usr/bin/yacc symlink ... + # we need to remove it to avoid triggering + # collision-protect errors. See bug 90089. + if [[ -L "${ROOT}/usr/bin/${PN}" ]]; then + rm -v "${ROOT}/usr/bin/${PN}" || die + fi +} + +pkg_postrm() { + # and if we uninstall yacc but keep bison, + # let's restore the /usr/bin/yacc symlink. + if [[ ! -e "${ROOT}/usr/bin/${PN}" ]] && [[ -e "${ROOT}/usr/bin/${PN}.bison" ]]; then + ln -s yacc.bison "${ROOT}/usr/bin/${PN}" || die + fi +} |