summaryrefslogtreecommitdiff
path: root/dev-util/yacc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-util/yacc
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-util/yacc')
-rw-r--r--dev-util/yacc/Manifest6
-rw-r--r--dev-util/yacc/files/yacc-1.9.1-CVE-2008-3196.patch33
-rw-r--r--dev-util/yacc/files/yacc-1.9.1-ia64.patch24
-rw-r--r--dev-util/yacc/files/yacc-1.9.1-mkstemp.patch15
-rw-r--r--dev-util/yacc/metadata.xml7
-rw-r--r--dev-util/yacc/yacc-1.9.1-r6.ebuild61
6 files changed, 146 insertions, 0 deletions
diff --git a/dev-util/yacc/Manifest b/dev-util/yacc/Manifest
new file mode 100644
index 000000000000..4431f3cfd38b
--- /dev/null
+++ b/dev-util/yacc/Manifest
@@ -0,0 +1,6 @@
+AUX yacc-1.9.1-CVE-2008-3196.patch 1199 BLAKE2B 665c89923dd7e9860518cff582390b74fafbed00b206d972455a46ceea90c7231e52dfbe41fdfc5f09d92a8e50655e9df3b180a5146ade4c3ec6cb68fc9b4257 SHA512 7c636f5b6d98d4bf33b60ae1c49079fc849c35ca9f84e3277bafc58d9689c7b8021af34c3d7411d8637b1c821036105e73b6d5770241de72d5358718a052abf3
+AUX yacc-1.9.1-ia64.patch 504 BLAKE2B b9733e07639ce5bc456576237be7623cae2f488f13bbc203dd0f81e7174c4f51e23ae498d80278ff1fc7873af456844087c72096ec05d621598362c048c68357 SHA512 6525f6c3f9d0011fea00781a24fb0f2d4f80a13835746d8ea8b05a762d789d5f17984da04f32178dbdd73ab098be38fe044bf108ed2e145888cf5ebfe84bb1ec
+AUX yacc-1.9.1-mkstemp.patch 417 BLAKE2B 1413aab68d930593c707723683a1a7938b4bf9d09671cb3539785ec163aa09a0e0bbbd1fee0657e34a8ac03fb9d71a97f1d1dda1af7329f56cda79f93fcb6de2 SHA512 c36d07d4fafc363fcb0173fc17cf4e37dfe20fcfe7df7faaa11d5cc47f9b933a4f192c55f738d1cdcf7f87ddb07311bbc54aa502d8e68b8e7831bf1daba8da03
+DIST yacc-1.9.1.tar.Z 64805 BLAKE2B 3eeebea1dad52a26c8e90ae6aec99fe3643f040100af4516faed02295b203f717a41aec0231ecee97aa31b14c9c29cae6704e875a03e8b18a71255be9859dd09 SHA512 6adb51c5f07e8084a86688589f52d9eee0183fb4d77508e36621a6b0ba91a5c4195feb87db3401ec69560554f71f2f6984dec01266e41e0fd54fa72ef1780e80
+EBUILD yacc-1.9.1-r6.ebuild 1550 BLAKE2B 74ae2b08beff20bd7bc5732b4b4f0b0418c3d017ba7d525745c55dabfb91aef2d9d7662efb5fac40b8ef285763b2ddee85c387f131a39ddd20158329ef3f55bf SHA512 b3beb6e9a2fc0d09044bcf4cd4b22ac4496659e518633a0ca7caaec91f933405fbb06c0571ecd557fc8496e4940ef6f09b4b1368775210e4d3e7d53e9fee6af6
+MISC metadata.xml 220 BLAKE2B eabf3517ba7e5b67320254eeb2b07adf1dbe0c3432b693973bc25a3e3dc8ed160b7313f9f8ae64d994ac272487b785f33202d9640bb5a7ace9f56ceb42978a19 SHA512 1db105eebacb6c7d44fd17746981e6e24badb2e81327410aa935a7603379cfcc8f3cf27dcf4e9d870cea2f73f6a15cf052e3e785205095ea9a93d72980ff71cc
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
+}