From 5c5a74f230b98dcdf3f494f879f9b3265bc3a021 Mon Sep 17 00:00:00 2001 From: giresun28 Date: Sun, 24 Jul 2016 14:00:22 +0000 Subject: [PATCH] fastjar,junit,libreoffice.paketlendi --- .../fastjar/fastjar-jartool.c_rev1.62.patch | 133 ++++++++++++++++++ talimatname/genel/fastjar/talimat | 21 +++ talimatname/genel/junit/talimat | 32 ++--- talimatname/genel/libreoffice/talimat | 11 +- 4 files changed, 174 insertions(+), 23 deletions(-) create mode 100644 talimatname/genel/fastjar/fastjar-jartool.c_rev1.62.patch create mode 100644 talimatname/genel/fastjar/talimat diff --git a/talimatname/genel/fastjar/fastjar-jartool.c_rev1.62.patch b/talimatname/genel/fastjar/fastjar-jartool.c_rev1.62.patch new file mode 100644 index 000000000..43b51ad4a --- /dev/null +++ b/talimatname/genel/fastjar/fastjar-jartool.c_rev1.62.patch @@ -0,0 +1,133 @@ +http://cvs.savannah.gnu.org/viewvc/fastjar/jartool.c?root=fastjar&r1=1.59&r2=1.62&view=patch + +Revision 1.62 - Thu Jun 10 11:32:48 2010 UTC (5 years, 6 months ago) by richi +2010-06-10 Jakub Jelinek + Dan Rosenberg + + * jartool.c (extract_jar): Fix up checks for traversal to parent + directories, disallow absolute paths, make the code slightly more + efficient. + +Revision 1.61 - Thu Jun 10 08:46:10 2010 UTC (5 years, 6 months ago) by richi +2010-06-10 Chris Ball + + * jartool.c (add_file_to_jar): Fix write return value check. + +Revision 1.60 - Mon Mar 1 15:38:43 2010 UTC (5 years, 9 months ago) by richi +2010-03-01 Richard Guenther + + * jartool.c (read_entries): Properly zero-terminate filename. + + +--- jartool.c 2009/09/06 22:16:00 1.59 ++++ jartool.c 2010/06/10 11:32:48 1.62 +@@ -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/talimatname/genel/fastjar/talimat b/talimatname/genel/fastjar/talimat new file mode 100644 index 000000000..d565085bd --- /dev/null +++ b/talimatname/genel/fastjar/talimat @@ -0,0 +1,21 @@ +# Description: Fastjar is an implementation of Sun's jar utility. +# URL: https://savannah.nongnu.org/projects/fastjar +# Packager: alihan-ozturk28@hotmail.com +# Depends on: zlib + +name=fastjar +version=0.98 +release=2 +source=(http://download.savannah.nongnu.org/releases/fastjar/$name-$version.tar.gz + fastjar-jartool.c_rev1.62.patch) + +build() { + cd $name-$version + patch -i $SRC/fastjar-jartool.c_rev1.62.patch + + ./configure --prefix=/usr + + make + make DESTDIR=$PKG install + rm -r $PKG/usr/share/info +} diff --git a/talimatname/genel/junit/talimat b/talimatname/genel/junit/talimat index e26da1fbc..7445845c2 100644 --- a/talimatname/genel/junit/talimat +++ b/talimatname/genel/junit/talimat @@ -1,31 +1,27 @@ # Description: The JUnit package contains a simple, open source framework to write and run repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. JUnit features include assertions for testing expected results, test fixtures for sharing common test data, and test runners for running tests. # URL: http://junit.org/ -# Packager: berlius at nutyx dot com +# Packager: alihan-ozturk28@hotmail.com # Depends on: apache-ant unzip description="Open source framework to write and run repeatable tests. It is an instance of the xUnit." name=junit -version=4.11 +version=4.12 release=1 -source=(https://launchpad.net/debian/+archive/primary/+files/junit4_4.11.orig.tar.gz - http://hamcrest.googlecode.com/files/hamcrest-1.3.tgz) +source=(https://github.com/junit-team/junit4/releases/download/r4.12/junit-4.12.jar + https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hamcrest/hamcrest-1.3.tgz) build() { + cd hamcrest-1.3 + install -dm755 $PKG/usr/share/java/hamcrest + for j in core library generator integration; do + cp hamcrest-${j}-1.3.jar $PKG/usr/share/java/hamcrest/${j}-1.3.jar + ln -s ${j}-1.3.jar $PKG/usr/share/java/hamcrest/${j}.jar + ln -s hamcrest/${j}-1.3.jar $PKG/usr/share/java/hamcrest-${j}.jar + done + cd .. - cd junit4-$version - - sed -i '\@/docs/@a' build.xml - - - cp -v $SRC/hamcrest-1.3/hamcrest-core-1.3{,-sources}.jar lib/ - /opt/ant/bin/ant populate-dist - - install -v -m755 -d $PKG/usr/share/{doc,java}/junit-4.11 - chown -R root:root . - - cp -v -R junit*/javadoc/* $PKG/usr/share/doc/junit-4.11 - cp -v junit*/junit*.jar $PKG/usr/share/java/junit-4.11 - cp -v $SRC/hamcrest-1.3/hamcrest-core*.jar $PKG/usr/share/java/junit-4.11 + install -D -m 644 $SRC/$name-$version.jar $PKG/usr/share/java/$name-$version.jar + ln -s $name-$version.jar $PKG/usr/share/java/$name.jar } diff --git a/talimatname/genel/libreoffice/talimat b/talimatname/genel/libreoffice/talimat index 780f33730..11dee4051 100644 --- a/talimatname/genel/libreoffice/talimat +++ b/talimatname/genel/libreoffice/talimat @@ -1,7 +1,7 @@ # Description: LibreOffice is a full-featured office suite. It is largely compatible with Microsoft Office and is descended from OpenOffice.org. # URL: http://www.libreoffice.org # Packagers: alihan-ozturk28@hotmail.com -# Depends on: tar openjdk apache-ant openldap python3 cups curl libatomic-ops gtk2 gtk3 perl-archive-zip perl-xml-parser boost expat gstreamer-plugins-base gstreamer1-plugins-base libgsf librsvg libxml2 libxslt neon nss poppler postgresql redland icu hunspell gsfonts dejavu-ttf p7zip graphite2 npapi-sdk clucene serf unixodbc +# Depends on: tar apache-ant openldap python3 cups curl libatomic-ops gtk2 gtk3 perl-archive-zip perl-xml-parser boost expat gstreamer-plugins-base gstreamer1-plugins-base libgsf librsvg libxml2 libxslt neon nss poppler postgresql redland icu hunspell gsfonts dejavu-ttf p7zip graphite2 npapi-sdk clucene serf unixodbc name=libreoffice version=5.2.0.3 @@ -16,14 +16,14 @@ build() { unset ACLOCAL export LO_PREFIX=/usr - cd $SRC - tar -xf $name-$version.tar.xz --no-overwrite-dir + #cd $SRC + #tar -xf $name-$version.tar.xz --no-overwrite-dir cd $name-$version install -dm755 external/tarballs ln -sv $SRC/$name-dictionaries-$version.tar.xz external/tarballs/ ln -sv $SRC/$name-help-$version.tar.xz external/tarballs/ - ln -sv $SRC/$name-translations-$version.tar.xz external/tarballs/ + ln -sv $SRC/$name-translations-$version.tar.xz external/tarballs/ sed -e "/gzip -f/d" \ @@ -73,7 +73,6 @@ build() { --with-system-libpng \ --with-system-libxml \ --with-system-neon \ - --with-system-npapi-headers \ --with-system-nss \ --with-system-odbc \ --with-system-openldap \ @@ -83,6 +82,8 @@ build() { --with-system-redland \ --with-system-serf \ --with-system-zlib \ + --with-jdk-home=/opt/jdk \ + --with-ant-home=/opt/ant \ --with-parallelism=$(getconf _NPROCESSORS_ONLN) make build