This repository has been archived by the owner on Apr 16, 2019. It is now read-only.
forked from gianm/zsync
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Colin Phipps
committed
Jan 15, 2006
0 parents
commit 937555a
Showing
48 changed files
with
8,457 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
Basic Installation | ||
================== | ||
|
||
These are the instructions for compiling and installing zsync for your | ||
system. These are mostly generic instructions on how to use the normal | ||
configure/make/gcc tools to build zsync - apart from the one paragraph below, | ||
nothing else is specific to zsync here. | ||
|
||
zsync uses the crypto library from OpenSSL. This is used to provide and | ||
verify SHA-1 checksums on downloaded files. If your OS comes with OpenSSL, you | ||
should install the OpenSSL development headers (usually in a package called | ||
openssl-devel or libssl-dev or something of that kind). zsync will compile | ||
without OpenSSL - but you lose the signature verification, and zsync will warn | ||
you about this. | ||
|
||
The `configure' shell script attempts to guess correct values for | ||
various system-dependent variables used during compilation. It uses | ||
those values to create a `Makefile' in each directory of the package. | ||
It may also create one or more `.h' files containing system-dependent | ||
definitions. Finally, it creates a shell script `config.status' that | ||
you can run in the future to recreate the current configuration, a file | ||
`config.cache' that saves the results of its tests to speed up | ||
reconfiguring, and a file `config.log' containing compiler output | ||
(useful mainly for debugging `configure'). If at some point `config.cache' | ||
contains results you don't want to keep, you may remove or edit it. | ||
|
||
If you need to do unusual things to compile the package, please try | ||
to figure out how `configure' could check whether to do them, and mail | ||
diffs or instructions to the address given in the `README' so they can | ||
be considered for the next release. | ||
|
||
The simplest way to compile this package is: | ||
|
||
1. `cd' to the directory containing the package's source code and type | ||
`./configure' to configure the package for your system. If you're | ||
using `csh' on an old version of System V, you might need to type | ||
`sh ./configure' instead to prevent `csh' from trying to execute | ||
`configure' itself. | ||
|
||
Running `configure' takes awhile. While running, it prints some | ||
messages telling which features it is checking for. If you see the | ||
message "checking for SHA1_Init in -lcrypto... no" it means that | ||
configure was unable to find your OpenSSL headers - zsync will still | ||
be compiled, but without support for checksum verification on the | ||
downloaded file. | ||
|
||
2. Type `make' to compile the package. | ||
|
||
3. Type `make install' to install the programs and any data files and | ||
documentation. If you prefer, you can just run zsync out of its own | ||
directory - zsync requires no data files, `make install' just makes it | ||
easier to use by putting the programs and manuals into the normal paths | ||
on your system. | ||
|
||
4. After `make install', you can remove the program binaries and object | ||
files from the source code directory by typing `make clean'. To also | ||
remove the files that `configure' created (so you can compile the | ||
package for a different kind of computer), type `make distclean'. | ||
|
||
Compilers and Options | ||
===================== | ||
|
||
Some systems require unusual options for compilation or linking that | ||
the `configure' script does not know about. You can give `configure' | ||
initial values for variables by setting them in the environment. Using | ||
a Bourne-compatible shell, you can do that on the command line like | ||
this: | ||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure | ||
|
||
Or on systems that have the `env' program, you can do it like this: | ||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure | ||
|
||
Compiling For Multiple Architectures | ||
==================================== | ||
|
||
You can compile the package for more than one kind of computer at the | ||
same time, by placing the object files for each architecture in their | ||
own directory. To do this, you must use a version of `make' that | ||
supports the `VPATH' variable, such as GNU `make'. `cd' to the | ||
directory where you want the object files and executables to go and run | ||
the `configure' script. `configure' automatically checks for the | ||
source code in the directory that `configure' is in and in `..'. | ||
|
||
If you have to use a `make' that does not supports the `VPATH' | ||
variable, you have to compile the package for one architecture at a time | ||
in the source code directory. After you have installed the package for | ||
one architecture, use `make distclean' before reconfiguring for another | ||
architecture. | ||
|
||
Installation Names | ||
================== | ||
|
||
By default, `make install' will install the package's files in | ||
`/usr/local/bin', `/usr/local/man', etc. You can specify an | ||
installation prefix other than `/usr/local' by giving `configure' the | ||
option `--prefix=PATH'. | ||
|
||
You can specify separate installation prefixes for | ||
architecture-specific files and architecture-independent files. If you | ||
give `configure' the option `--exec-prefix=PATH', the package will use | ||
PATH as the prefix for installing programs and libraries. | ||
Documentation and other data files will still use the regular prefix. | ||
|
||
In addition, if you use an unusual directory layout you can give | ||
options like `--bindir=PATH' to specify different values for particular | ||
kinds of files. Run `configure --help' for a list of the directories | ||
you can set and what kinds of files go in them. | ||
|
||
If the package supports it, you can cause programs to be installed | ||
with an extra prefix or suffix on their names by giving `configure' the | ||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. | ||
|
||
Optional Features | ||
================= | ||
|
||
Some packages pay attention to `--enable-FEATURE' options to | ||
`configure', where FEATURE indicates an optional part of the package. | ||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE | ||
is something like `gnu-as' or `x' (for the X Window System). The | ||
`README' should mention any `--enable-' and `--with-' options that the | ||
package recognizes. | ||
|
||
Specifying the System Type | ||
========================== | ||
|
||
There may be some features `configure' can not figure out | ||
automatically, but needs to determine by the type of host the package | ||
will run on. Usually `configure' can figure that out, but if it prints | ||
a message saying it can not guess the host type, give it the | ||
`--host=TYPE' option. TYPE can either be a short name for the system | ||
type, such as `sun4', or a canonical name with three fields: | ||
CPU-COMPANY-SYSTEM | ||
|
||
See the file `config.sub' for the possible values of each field. If | ||
`config.sub' isn't included in this package, then this package doesn't | ||
need to know the host type. | ||
|
||
If you are building compiler tools for cross-compiling, you can also | ||
use the `--target=TYPE' option to select the type of system they will | ||
produce code for and the `--build=TYPE' option to select the type of | ||
system on which you are compiling the package. | ||
|
||
Sharing Defaults | ||
================ | ||
|
||
If you want to set default values for `configure' scripts to share, | ||
you can create a site shell script called `config.site' that gives | ||
default values for variables like `CC', `cache_file', and `prefix'. | ||
`configure' looks for `PREFIX/share/config.site' if it exists, then | ||
`PREFIX/etc/config.site' if it exists. Or, you can set the | ||
`CONFIG_SITE' environment variable to the location of the site script. | ||
A warning: not all `configure' scripts look for a site script. | ||
|
||
Operation Controls | ||
================== | ||
|
||
`configure' recognizes the following options to control how it | ||
operates. | ||
|
||
`--cache-file=FILE' | ||
Use and save the results of the tests in FILE instead of | ||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for | ||
debugging `configure'. | ||
|
||
`--help' | ||
Print a summary of the options to `configure', and exit. | ||
|
||
`--quiet' | ||
`--silent' | ||
`-q' | ||
Do not print messages saying which checks are being made. To | ||
suppress all normal output, redirect it to `/dev/null' (any error | ||
messages will still be shown). | ||
|
||
`--srcdir=DIR' | ||
Look for the package's source code in directory DIR. Usually | ||
`configure' can determine that directory automatically. | ||
|
||
`--version' | ||
Print the version of Autoconf used to generate the `configure' | ||
script, and exit. | ||
|
||
`configure' also accepts some other, not widely useful, options. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
SUBDIRS = lib zlib doc | ||
|
||
bin_PROGRAMS = zsyncmake zsync | ||
|
||
zsyncmake_SOURCES = make.c | ||
zsyncmake_LDADD = lib/libzsync.a zlib/libinflate.a | ||
|
||
zsync_SOURCES = client.c http.c http.h fetch.c fetch.h zfetch.c | ||
zsync_LDADD = lib/libzsync.a zlib/libinflate.a | ||
|
||
# From "GNU autoconf, automake and libtool" Vaughan, Elliston, | ||
# # Tromey and Taylor, publisher New Riders, p.134 | ||
# # They made me do it! :-) | ||
AUX_DIST_GEN = \ | ||
$(ac_aux_dir)/config.guess \ | ||
$(ac_aux_dir)/config.sub \ | ||
$(ac_aux_dir)/install-sh \ | ||
$(ac_aux_dir)/missing \ | ||
$(ac_aux_dir)/ac_c_compile_flags.m4 | ||
|
||
docdir=$(prefix)/share/doc/@PACKAGE@ | ||
doc_DATA = COPYING README | ||
EXTRA_DIST = bootstrap INSTALL README COPYING $(AUX_DIST_GEN) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
zsync 0.0.1 | ||
=========== | ||
|
||
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). | ||
|
||
The zsync web site is at http://zsync.moria.org.uk/ . There are likely to be | ||
frequent releases, so check back often. | ||
|
||
Installation | ||
------------ | ||
|
||
See the file INSTALL for instructions on compiling and (optionally) installing | ||
zsync. | ||
|
||
As zsync is still at a very early stage, you may prefer not to install it, and | ||
to run the program where you compile it. It will work fine that way - it has no | ||
data files or libraries. The man(1) program on some systems will let you read | ||
the man pages without installing them, e.g. man -l doc/zsync.1 . | ||
|
||
zsync is free software. There is no implied support, no implied fitness for | ||
purpose, no warranty. You use it at your own risk. | ||
|
||
Use | ||
--- | ||
|
||
In its simplest form: | ||
|
||
zsync http://some.example.com/downloads/my-big-download.tar.zsync | ||
|
||
Someone has to make a .zsync file for the download before you can use zsync. As | ||
I am only just releasing 0.0.1, there won't be many such downloads around :-). | ||
And you have to have an older copy of the file around, otherwise there is | ||
little point in using zsync - zsync normally looks in the current directory for | ||
a file of the same name as the one being downloaded (note: if the download is a | ||
.gz file, the local file should be uncompressed - use gzip -d to decompress it | ||
first). If the local file is not in the current directory or has a different | ||
name, you can specify it with -i, e.g.: | ||
|
||
zsync -i /var/lib/apt/lists/ftp.uk.debian.org_debian_dists_sarge_main_binary-i386_Packages http://zsync.moria.org.uk/streams/sarge/Packages.zsync | ||
|
||
To offer a zsync download, use the zsyncmake program to produce a .zsync file. | ||
You have to have a local copy of the file that you will be offering to | ||
download. | ||
|
||
zsyncmake -u http://some.example.org/downloads/my-big-download.tar.gz my-big-download.tar.gz | ||
|
||
Note that zsync requires both the public URL for the full download, and a local | ||
copy of the same file. Users will still need access to the full downloads - | ||
zsync merely allows then to save time by only downloading parts of the file. | ||
|
||
zsync will produce a file with the same name (but possibly removing any | ||
extension for compression) with .zsync appended; this is the control file. You | ||
then put this on your web server, and people can use the zsync client with it. | ||
|
||
Feedback, Support | ||
----------------- | ||
|
||
Mail zsync-users@lists.sourceforge.net if you have questions about zsync. And | ||
join the mailing list if you are using it a lot or are interested in the | ||
ongoing development. | ||
|
||
Copyright, Author | ||
----------------- | ||
|
||
zsync was written and is developed by Colin Phipps <cph@moria.org.uk>. It is | ||
copyright (C) 2004 Colin Phipps. zsync is made available under the GNU General | ||
Public License - see the file COPYING for details. | ||
|
||
zsync is based on the rsync algorithm, by Andrew Trigell; and there is a little | ||
of his code from rsync included in zsync (lib/mdfour.c). zsync also includes | ||
code from zlib - see zlib/README for details. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
AC_DEFUN([AC_C_COMPILE_FLAGS],[ | ||
NEW_CFLAGS="$CFLAGS" | ||
for ac_flag in $1 | ||
do | ||
AC_MSG_CHECKING(whether compiler supports $ac_flag) | ||
CFLAGS="$NEW_CFLAGS $ac_flag" | ||
AC_TRY_COMPILE(,[ | ||
void f() {}; | ||
],[ | ||
NEW_CFLAGS="$CFLAGS" | ||
AC_MSG_RESULT(yes) | ||
],AC_MSG_RESULT(no)) | ||
done | ||
CFLAGS="$NEW_CFLAGS" | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
# | ||
# cphipps - short script to start building from a maintainer-clean'ed tree | ||
# | ||
mkdir autotools | ||
aclocal -I autotools && autoheader && automake --add-missing --foreign && autoconf |
Oops, something went wrong.