summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/zsync
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
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 <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/zsync')
-rw-r--r--net-misc/zsync/Manifest2
-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.ebuild47
4 files changed, 275 insertions, 0 deletions
diff --git a/net-misc/zsync/Manifest b/net-misc/zsync/Manifest
new file mode 100644
index 000000000000..dd4fdf2dd0cd
--- /dev/null
+++ b/net-misc/zsync/Manifest
@@ -0,0 +1,2 @@
+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
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..d675d5ef7117
--- /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>
+ <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..8ab1faccffd8
--- /dev/null
+++ b/net-misc/zsync/zsync-0.6.2-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+}