summaryrefslogtreecommitdiff
path: root/net-misc/zsync
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/zsync
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/zsync')
-rw-r--r--net-misc/zsync/Manifest7
-rw-r--r--net-misc/zsync/files/zsync-0.6.2-zlib-1.2.3-support.patch201
-rw-r--r--net-misc/zsync/metadata.xml25
-rw-r--r--net-misc/zsync/zsync-0.6.2-r1.ebuild46
4 files changed, 279 insertions, 0 deletions
diff --git a/net-misc/zsync/Manifest b/net-misc/zsync/Manifest
new file mode 100644
index 000000000000..a556c79501b8
--- /dev/null
+++ b/net-misc/zsync/Manifest
@@ -0,0 +1,7 @@
+AUX zsync-0.6.2-zlib-1.2.3-support.patch 7069 SHA256 b7ca3e3352bd6d6d6efe4df0340adb2df01849216fb2ca20e2d6b7caf72eeedb SHA512 b572510cb135f97d63df6d49e3f07ce91c30926c91d1096f73d4577be754bcb37c8106ac51a1a0a651d9e77b971b4fdbdc82380b081b2065183ffa95930bcd47 WHIRLPOOL fac89cf7dc6731e4e192753deea82b9daf2757bf92d45c8e14cd5990efaf5e9ed50ec14d891f858761f9e975b5c88af6dbef891ba93c0af0b03c57477f7fded8
+DIST zlib-1.2.3.tar.bz2 425209 SHA256 e3b9950851a19904d642c4dec518623382cf4d2ac24f70a76510c944330d28ca SHA512 edae735960279d92acf58e1f4095c6392a7c2059b8f1d2c46648fc608a0fb06b392db2d073f4973f5762c034ea66596e769b95b3d26ad963a086b9b2d09825f2 WHIRLPOOL e874b123296f5d77daf60617501b30f4beebccb64b3910c2539f75f6c194a2cf4885dc7a3904bf790e1651120ec33b55c48e95970dd6bfd6c4d0a2ea48d7d0f4
+DIST zsync-0.6.2.tar.bz2 245592 SHA256 0b9d53433387aa4f04634a6c63a5efa8203070f2298af72a705f9be3dda65af2 SHA512 56437594831f2320c532759805b5c51116c53c8848f14b54cfd9b76676d1d061abe7fc914264f496ed1c7922fbbd5b884166c855a2fb9eb1285f216e478c5f0d WHIRLPOOL d7f2d864b791fc38522d376eef8cb2ea38e57d91da7f8d2ea1379ecdb8397b4ff672c954dc5fd6e90f786d8d48836fd8b637cf8a60229646a1a9c2635bffb51f
+EBUILD zsync-0.6.2-r1.ebuild 1086 SHA256 5ffa05c4dc12f12ec934cf32aab029b3362d66c54f631aed03d942a5f5f9b4a5 SHA512 e2fec8aa4c44a1380edce1a8e5ce727693924f16f2cf4addf6b450aed03f6492f84be08605699b033ae62fa35053e8a881d12ede1f5bbcd831f48947f7fbf5e5 WHIRLPOOL 0bae602711c1826647319a9de2e956fc58044ff8b10db27398f39c324622414145667103224a8d2995d92357d4d958d5b064f0ea54f06cb7900b7c0f25b26500
+MISC ChangeLog 2223 SHA256 6545b7be9ac9e11669b1c8182788643794710c4bfd4a3ee0c9a153870a91fe60 SHA512 df87bfd83e17019e655e7f6eda69226a13e5627d7eda995bff07aa19ec0bbcc65f518fb11769951700272dbf61c9b575d22de1340426529d4b311569f9e54185 WHIRLPOOL 6b90bee07a416f63f18bf67a647b5f4e852e6e5a9c06ee927ddad9c009de6f3c8e3a3f0602c255bc3bd59d6e13fda8b347425016975a01d9eb4ce92f33442f60
+MISC ChangeLog-2015 1945 SHA256 9b2c8cf4be5d20a6040e95bdf51f98d129968121f16e9f5b9a9814b43f1ec3ca SHA512 831d040440f422a1803c105124d4f6116e0bc3a9b409567f30121dd950970393d49dee0ed10d43b65a13d036104044cd87b025ba0bd506455ae25a1559113111 WHIRLPOOL 59d1906123570c6d1564f064548274bddcb30740e63acee85ab2c32f34b6ae6124f94b9d6a829e96293cc5a708b5532e50272e6cb45ce324d8c7a72baa8a1d01
+MISC metadata.xml 1264 SHA256 fcded9365f56d4f6d75893dbf5f336666aff04f7c759bd714260a9a86af19197 SHA512 2b426d47519f21b1a560e8efc4be732803a2c577b28e8cef0aa10a46544495e32ca8c933860e09a75ff860427aa517bde415d5f30f15bde47b2d4a81a1ca94c8 WHIRLPOOL 6220ceaaa8e26d87165c1729ba163cf3feaa8a1f7cc18c21a286e0c5c36e93cfde240aee522b951f0e16ca529d12f29ef2144f5208f851112b240091cfebfcce
diff --git a/net-misc/zsync/files/zsync-0.6.2-zlib-1.2.3-support.patch b/net-misc/zsync/files/zsync-0.6.2-zlib-1.2.3-support.patch
new file mode 100644
index 000000000000..38729b06db73
--- /dev/null
+++ b/net-misc/zsync/files/zsync-0.6.2-zlib-1.2.3-support.patch
@@ -0,0 +1,201 @@
+This is a forward-port to zlib-1.2.3 of the zlib-1.2.11 changes found in
+zsync-0.6.2.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/deflate.c zlib-1.2.3/deflate.c
+--- zlib-1.2.3.orig/deflate.c 2005-07-18 02:27:31.000000000 +0000
++++ zlib-1.2.3/deflate.c 2011-02-09 21:36:02.000000000 +0000
+@@ -807,7 +807,7 @@
+ }
+ if (bstate == block_done) {
+ if (flush == Z_PARTIAL_FLUSH) {
+- _tr_align(s);
++ // _tr_align(s);
+ } else { /* FULL_FLUSH or SYNC_FLUSH */
+ _tr_stored_block(s, (char*)0, 0L, 0);
+ /* For a full flush, this empty block will be recognized
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/inflate.c zlib-1.2.3/inflate.c
+--- zlib-1.2.3.orig/inflate.c 2005-06-14 21:50:12.000000000 +0000
++++ zlib-1.2.3/inflate.c 2011-02-09 21:36:02.000000000 +0000
+@@ -6,6 +6,12 @@
+ /*
+ * Change history:
+ *
++ * cph 26 Oct 2004
++ * - A few minor hacks to allow me to locate safe start points in streams
++ * and to position a new inflate on the right bit. I hereby place any
++ * changes to this file (and the zlib.h and inflate.h in this dir) into
++ * the public domain.
++ *
+ * 1.2.beta0 24 Nov 2002
+ * - First version -- complete rewrite of inflate to simplify code, avoid
+ * creation of window when not needed, minimize use of window when it is
+@@ -83,7 +89,6 @@
+ #include "zutil.h"
+ #include "inftrees.h"
+ #include "inflate.h"
+-#include "inffast.h"
+
+ #ifdef MAKEFIXED
+ # ifndef BUILDFIXED
+@@ -93,7 +98,6 @@
+
+ /* function prototypes */
+ local void fixedtables OF((struct inflate_state FAR *state));
+-local int updatewindow OF((z_streamp strm, unsigned out));
+ #ifdef BUILDFIXED
+ void makefixed OF((void));
+ #endif
+@@ -320,7 +324,7 @@
+ output will fall in the output data, making match copies simpler and faster.
+ The advantage may be dependent on the size of the processor's data caches.
+ */
+-local int updatewindow(strm, out)
++int updatewindow(strm, out)
+ z_streamp strm;
+ unsigned out;
+ {
+@@ -925,6 +929,9 @@
+ /* handle error breaks in while */
+ if (state->mode == BAD) break;
+
++ if (state->mode == BAD)
++ break;
++
+ /* build code tables */
+ state->next = state->codes;
+ state->lencode = (code const FAR *)(state->next);
+@@ -948,12 +955,10 @@
+ Tracev((stderr, "inflate: codes ok\n"));
+ state->mode = LEN;
+ case LEN:
+- if (have >= 6 && left >= 258) {
+- RESTORE();
+- inflate_fast(strm, out);
+- LOAD();
+- break;
+- }
++ state->mode = LENDO;
++ goto inf_leave;
++ case LENDO:
++ /* cph - remove inflate_fast */
+ for (;;) {
+ this = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(this.bits) <= bits) break;
+@@ -1366,3 +1371,48 @@
+ dest->state = (struct internal_state FAR *)copy;
+ return Z_OK;
+ }
++
++/* cph 2004/10/17
++ * Extra stuff I need to move around in gzip files
++ */
++
++void inflate_advance(strm,zoffset,b,s)
++ z_streamp strm;
++ int zoffset;
++ int b;
++ int s;
++{
++ struct inflate_state FAR* state = (struct inflate_state FAR *)strm->state;
++
++ if (s)
++ state->mode = TYPEDO;
++ else if (state->mode == COPY) {
++ /* Reduce length remaining to copy by correct number */
++ state->length -= zoffset - strm->total_in;
++ } else
++ state->mode = LENDO;
++
++ strm->total_in = zoffset; /* We are here, plus a few more bits. */
++
++ if (b) {
++ state->hold = *(strm->next_in)++;
++ state->hold >>= b;
++ state->bits = 8-b;
++ strm->avail_in--;
++ strm->total_in++;
++ } else {
++ state->bits = 0;
++ state->hold = 0;
++ }
++}
++
++int ZEXPORT inflateSafePoint(strm)
++z_streamp strm;
++{
++ struct inflate_state FAR *state;
++
++ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
++ state = (struct inflate_state FAR *)strm->state;
++ return (state->mode == LENDO || state->mode == COPY);
++}
++
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/inflate.h zlib-1.2.3/inflate.h
+--- zlib-1.2.3.orig/inflate.h 2004-11-13 05:38:28.000000000 +0000
++++ zlib-1.2.3/inflate.h 2011-02-09 21:36:02.000000000 +0000
+@@ -37,6 +37,7 @@
+ LENLENS, /* i: waiting for code length code lengths */
+ CODELENS, /* i: waiting for length/lit and distance code lengths */
+ LEN, /* i: waiting for length/lit code */
++ LENDO, /* i: same, but skip exit check */
+ LENEXT, /* i: waiting for length extra bits */
+ DIST, /* i: waiting for distance code */
+ DISTEXT, /* i: waiting for distance extra bits */
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/Makefile.am zlib-1.2.3/Makefile.am
+--- zlib-1.2.3.orig/Makefile.am 1970-01-01 00:00:00.000000000 +0000
++++ zlib-1.2.3/Makefile.am 2011-02-09 21:36:06.000000000 +0000
+@@ -0,0 +1,6 @@
++
++noinst_LIBRARIES = libinflate.a libdeflate.a
++
++libinflate_a_SOURCES = zlib.h inflate.c inflate.h inffixed.h adler32.c inftrees.c inftrees.h zutil.c zutil.h crc32.c crc32.h zconf.h
++
++libdeflate_a_SOURCES = deflate.c deflate.h compress.c trees.c trees.h
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/zconf.h zlib-1.2.3/zconf.h
+--- zlib-1.2.3.orig/zconf.h 2005-05-28 06:40:35.000000000 +0000
++++ zlib-1.2.3/zconf.h 2011-02-09 21:36:06.000000000 +0000
+@@ -284,9 +284,8 @@
+ typedef Byte *voidp;
+ #endif
+
+-#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
++#if 1 /* HAVE_UNISTD_H -- this line is updated by ./configure */
+ # include <sys/types.h> /* for off_t */
+-# include <unistd.h> /* for SEEK_* and off_t */
+ # ifdef VMS
+ # include <unixio.h> /* for off_t */
+ # endif
+diff -Nuar --exclude Makefile.in zlib-1.2.3.orig/zlib.h zlib-1.2.3/zlib.h
+--- zlib-1.2.3.orig/zlib.h 2005-07-18 02:26:49.000000000 +0000
++++ zlib-1.2.3/zlib.h 2011-02-09 21:36:06.000000000 +0000
+@@ -1110,9 +1110,10 @@
+ of bytes into the buffer.
+ gzread returns the number of uncompressed bytes actually read (0 for
+ end of file, -1 for error). */
+-
++#if 0
+ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
++#endif
+ /*
+ Writes the given number of uncompressed bytes into the compressed file.
+ gzwrite returns the number of uncompressed bytes actually written
+@@ -1308,6 +1309,8 @@
+ len2.
+ */
+
++ZEXTERN int ZEXPORT updatewindow OF((z_streamp strm, unsigned out));
++ZEXTERN void ZEXPORT inflate_advance OF((z_streamp strm, int zoffset, int b, int s));
+
+ /* various hacks, don't look :) */
+
+@@ -1348,6 +1351,7 @@
+
+ ZEXTERN const char * ZEXPORT zError OF((int));
+ ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
++ZEXTERN int ZEXPORT inflateSafePoint OF((z_streamp z));
+ ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+
+ #ifdef __cplusplus
diff --git a/net-misc/zsync/metadata.xml b/net-misc/zsync/metadata.xml
new file mode 100644
index 000000000000..ca294a5c6757
--- /dev/null
+++ b/net-misc/zsync/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ From the zsync web page:
+
+ "zsync is a file transfer program. It allows you to download a file from a
+ remote web server, where you have a copy of an older version of the file on your
+ computer already. zsync downloads only the new parts of the file. It uses the
+ same algorithm as rsync.
+
+ zsync does not require any special server software or a shell account on the
+ remote system (rsync, in comparison, requires that you have an rsh or ssh
+ account, or that the remote system runs rsyncd). Instead, it uses a control file
+ -- a .zsync file -- that describes the file to be downloaded and enables zsync to
+ work out which blocks it needs. This file can be created by the admin of the web
+ server hosting the download, and placed alongside the file to download -- it is
+ generated once, then any downloaders with zsync can use it. Alternatively,
+ anyone can download the file, make a .zsync and provide it to other users (this
+ is what I am doing for the moment)."
+ </longdescription>
+</pkgmetadata>
diff --git a/net-misc/zsync/zsync-0.6.2-r1.ebuild b/net-misc/zsync/zsync-0.6.2-r1.ebuild
new file mode 100644
index 000000000000..cc19d4024ce0
--- /dev/null
+++ b/net-misc/zsync/zsync-0.6.2-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils
+
+ZLIB_PV=1.2.3
+ZLIB_P="zlib-${ZLIB_PV}"
+
+DESCRIPTION="Partial/differential file download client over HTTP which uses the rsync algorithm"
+HOMEPAGE="http://zsync.moria.org.uk/"
+SRC_URI="
+ http://zsync.moria.org.uk/download/${P}.tar.bz2
+ http://www.gzip.org/zlib/${ZLIB_P}.tar.bz2
+ http://www.zlib.net/${ZLIB_P}.tar.bz2"
+
+LICENSE="Artistic-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+ZLIB_S="${WORKDIR}/${ZLIB_P}"
+
+src_prepare() {
+ # Move old zlib-1.2.11 out the way
+ mv "${S}"/zlib zlib-1.2.11-modified || die
+
+ cd "${ZLIB_S}" || die
+ # I am not sure how many other zlib patches we will need to port as well
+ # This covers the security vuln in 1.2.11
+ epatch "${FILESDIR}"/${P}-${ZLIB_P}-support.patch
+ rm -f Makefile || die
+
+ cd "${S}" || die
+ cp -a "${ZLIB_S}" "${ZLIB_P}-modified" || die
+ ln -s "${ZLIB_P}-modified" zlib || die
+
+ eautoreconf
+}
+
+src_install() {
+ dobin zsync zsyncmake
+ dodoc NEWS README
+ doman doc/zsync.1 doc/zsyncmake.1
+}