From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- app-arch/fastjar/Manifest | 1 + app-arch/fastjar/fastjar-0.98-r2.ebuild | 25 +++++++ app-arch/fastjar/fastjar-0.98-r3.ebuild | 25 +++++++ app-arch/fastjar/files/0.98-traversal.patch | 112 ++++++++++++++++++++++++++++ app-arch/fastjar/metadata.xml | 10 +++ 5 files changed, 173 insertions(+) create mode 100644 app-arch/fastjar/Manifest create mode 100644 app-arch/fastjar/fastjar-0.98-r2.ebuild create mode 100644 app-arch/fastjar/fastjar-0.98-r3.ebuild create mode 100644 app-arch/fastjar/files/0.98-traversal.patch create mode 100644 app-arch/fastjar/metadata.xml (limited to 'app-arch/fastjar') diff --git a/app-arch/fastjar/Manifest b/app-arch/fastjar/Manifest new file mode 100644 index 000000000000..e65f0bddc913 --- /dev/null +++ b/app-arch/fastjar/Manifest @@ -0,0 +1 @@ +DIST fastjar-0.98.tar.gz 717984 SHA256 f156abc5de8658f22ee8f08d7a72c88f9409ebd8c7933e9466b0842afeb2f145 SHA512 c0f9fca7b58d6acd00b90a5184dbde9ba3ffc5bf4d69512743e450649a272baf1f6af98b15d79d2b53990eaf84ef402c986035e6b615a19e35ed424348143903 WHIRLPOOL 6e1053713995532aa58b935f2935cc6d81331f35c1c6870f4758f7abd856d9976082553e74bebc43476ae48f64d6b7154264cc1bdcd0b9bee0230a5c07a6be3e diff --git a/app-arch/fastjar/fastjar-0.98-r2.ebuild b/app-arch/fastjar/fastjar-0.98-r2.ebuild new file mode 100644 index 000000000000..b2a537e1ddf8 --- /dev/null +++ b/app-arch/fastjar/fastjar-0.98-r2.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils + +DESCRIPTION="A jar program written in C" +HOMEPAGE="https://savannah.nongnu.org/projects/fastjar" +SRC_URI="http://download.savannah.nongnu.org/releases/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris" + +IUSE="" + +# bug #188542 +RDEPEND="!<=dev-java/kaffe-1.1.7-r5" + +src_prepare() { + # bug #325557 + epatch "${FILESDIR}/0.98-traversal.patch" +} diff --git a/app-arch/fastjar/fastjar-0.98-r3.ebuild b/app-arch/fastjar/fastjar-0.98-r3.ebuild new file mode 100644 index 000000000000..20584692df01 --- /dev/null +++ b/app-arch/fastjar/fastjar-0.98-r3.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +DESCRIPTION="A jar program written in C" +HOMEPAGE="https://savannah.nongnu.org/projects/fastjar" +SRC_URI="http://download.savannah.nongnu.org/releases/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris" + +IUSE="" + +# bug #188542 +RDEPEND="!<=dev-java/kaffe-1.1.7-r5" + +src_prepare() { + # bug #325557 + epatch "${FILESDIR}/0.98-traversal.patch" +} diff --git a/app-arch/fastjar/files/0.98-traversal.patch b/app-arch/fastjar/files/0.98-traversal.patch new file mode 100644 index 000000000000..511f4c6cd838 --- /dev/null +++ b/app-arch/fastjar/files/0.98-traversal.patch @@ -0,0 +1,112 @@ +--- fastjar-0.98.orig/jartool.c ++++ fastjar-0.98/jartool.c +@@ -790,6 +790,7 @@ + progname, jarfile); + return 1; + } ++ ze->filename[len] = '\0'; + len = UNPACK_UB4(header, CEN_EFLEN); + len += UNPACK_UB4(header, CEN_COMLEN); + if (lseek (fd, len, SEEK_CUR) == -1) +@@ -1257,7 +1258,7 @@ + exit_on_error("write"); + + /* write the file name to the zip file */ +- if (1 == write(jfd, fname, file_name_length)) ++ if (-1 == write(jfd, fname, file_name_length)) + exit_on_error("write"); + + if(verbose){ +@@ -1730,7 +1731,17 @@ + struct stat sbuf; + int depth = 0; + +- tmp_buff = malloc(sizeof(char) * strlen((const char *)filename)); ++ if(*filename == '/'){ ++ fprintf(stderr, "Absolute path names are not allowed.\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ tmp_buff = malloc(strlen((const char *)filename)); ++ ++ if(tmp_buff == NULL) { ++ fprintf(stderr, "Out of memory.\n"); ++ exit(EXIT_FAILURE); ++ } + + for(;;){ + const ub1 *idx = (const unsigned char *)strchr((const char *)start, '/'); +@@ -1738,25 +1749,28 @@ + if(idx == NULL) + break; + else if(idx == start){ ++ tmp_buff[idx - filename] = '/'; + start++; + continue; + } +- start = idx + 1; + +- strncpy(tmp_buff, (const char *)filename, (idx - filename)); +- tmp_buff[(idx - filename)] = '\0'; ++ memcpy(tmp_buff + (start - filename), (const char *)start, (idx - start)); ++ tmp_buff[idx - filename] = '\0'; + + #ifdef DEBUG + printf("checking the existance of %s\n", tmp_buff); + #endif +- if(strcmp(tmp_buff, "..") == 0){ ++ if(idx - start == 2 && memcmp(start, "..", 2) == 0){ + --depth; + if (depth < 0){ + fprintf(stderr, "Traversal to parent directories during unpacking!\n"); + exit(EXIT_FAILURE); + } +- } else if (strcmp(tmp_buff, ".") != 0) ++ } else if (idx - start != 1 || *start != '.') + ++depth; ++ ++ start = idx + 1; ++ + if(stat(tmp_buff, &sbuf) < 0){ + if(errno != ENOENT) + exit_on_error("stat"); +@@ -1765,6 +1779,7 @@ + #ifdef DEBUG + printf("Directory exists\n"); + #endif ++ tmp_buff[idx - filename] = '/'; + continue; + }else { + fprintf(stderr, "Hmmm.. %s exists but isn't a directory!\n", +@@ -1781,10 +1796,11 @@ + if(verbose && handle) + printf("%10s: %s/\n", "created", tmp_buff); + ++ tmp_buff[idx - filename] = '/'; + } + + /* only a directory */ +- if(strlen((const char *)start) == 0) ++ if(*start == '\0') + dir = TRUE; + + #ifdef DEBUG +@@ -1792,7 +1808,7 @@ + #endif + + /* If the entry was just a directory, don't write to file, etc */ +- if(strlen((const char *)start) == 0) ++ if(*start == '\0') + f_fd = -1; + + free(tmp_buff); +@@ -1876,7 +1892,8 @@ + exit(EXIT_FAILURE); + } + +- close(f_fd); ++ if (f_fd != -1) ++ close(f_fd); + + if(verbose && dir == FALSE && handle) + printf("%10s: %s\n", diff --git a/app-arch/fastjar/metadata.xml b/app-arch/fastjar/metadata.xml new file mode 100644 index 000000000000..2b065fd7b06f --- /dev/null +++ b/app-arch/fastjar/metadata.xml @@ -0,0 +1,10 @@ + + + + java + + Fastjar is a version of Sun's 'jar' utility, written entirely in C, + and therefore quite a bit faster. Fastjar can be up to 100x faster + than the stock 'jar' program running without a JIT. + + -- cgit v1.2.3-65-gdbad