--- parchive-1.1.orig/Makefile
+++ parchive-1.1/Makefile
@@ -1,4 +1,7 @@
+# Edited for Debian GNU/Linux.
+DESTDIR =
+
CFLAGS=-g -W -Wall -Wno-unused -O2
par: backend.o checkpar.o makepar.o rwpar.o rs.o md5.o fileops.o main.o readoldpar.o interface.o ui_text.o
@@ -14,4 +17,4 @@
make CC="dos-gcc -s"
install: par
- install par ${HOME}/bin/
+ install par ${DESTDIR}/usr/bin/parchive
--- parchive-1.1.orig/rwpar.c
+++ parchive-1.1/rwpar.c
@@ -232,8 +232,13 @@
i = read_i64(&pf->size);
file->status = read_i64(&pf->status);
file->file_size = read_i64(&pf->file_size);
+/* DEBIAN: Applied patch from
+ * <http://sourceforge.net/forum/forum.php?thread_id=480782&forum_id=96207>
COPY(file->hash, pf->hash, sizeof(md5));
COPY(file->hash_16k, pf->hash_16k, sizeof(md5));
+ */
+ memmove(file->hash, pf->hash, sizeof(md5));
+ memmove(file->hash_16k, pf->hash_16k, sizeof(md5));
l = (i - FILE_ENTRY_FIX_SIZE) / 2;
NEW(file->filename, pl + l + 1);
COPY(file->filename, path, pl);
--- parchive-1.1.orig/main.c
+++ parchive-1.1/main.c
@@ -30,12 +30,12 @@
{
printf(
"Usage:\n"
-" par c(heck) [options] <par file> : Check parity archive\n"
-" par r(ecover) [options] <par file> : Restore missing volumes\n"
-" par a(dd) [options] <par file> [files] : Add files to parity archive\n"
+" parchive c(heck) [options] <par file> : Check parity archive\n"
+" parchive r(ecover) [options] <par file> : Restore missing volumes\n"
+" parchive a(dd) [options] <par file> [files] : Add files to parity archive\n"
" Advanced:\n"
-" par m(ix) [options] : Try to restore from all parity files at once\n"
-" par i(nteractive) [<par files>] : Interactive mode (very bare-bones)\n"
+" parchive m(ix) [options] : Try to restore from all parity files at once\n"
+" parchive i(nteractive) [<par files>] : Interactive mode (very bare-bones)\n"
"\n"
"Options: (Can be turned off with '+')\n"
" -m : Move existing files out of the way\n"
--- parchive-1.1.orig/parchive.1
+++ parchive-1.1/parchive.1
@@ -0,0 +1,93 @@
+.TH PARCHIVE "1" "May 30 2004" "parchive 1.1" "User Commands"
+.SH NAME
+parchive \- RAID like data recovery for PAR ver 1.0 files
+.SH DESCRIPTION
+The idea behind the parchive is to provide a tool to apply the data-recovery
+capability concepts of RAID-like systems to the posting and recovery of
+multi-part archives on Usenet. Current filespec and clients support the
+'Reed-Soloman Code' implementation that allows for recovery of any 'X'
+volumes for 'X' parity volumes present.
+
+The key to this mission is a clean file format specification which provides
+all the necessary capabilities for programs to easily verify and regenerate
+single missing parts out of a set of archives.
+
+We might just be able to make binary posting and downloading on Usenet a
+little easier. That's a pretty cool goal!
+
+Note that parchive supports the old legacy version 1.0 PAR format.
+For new projects, use the par2 package which supports the version 2.0
+PAR format which provides superior features.
+
+This manual page was written for the Debian GNU/Linux distribution
+because the original program does not have a manual page.
+.SH USAGE
+.TP
+parchive c(heck) [options] <par file>
+Check parity archive
+.TP
+parchive r(ecover) [options] <par file>
+Restore missing volumes
+.TP
+parchive a(dd) [options] <par file> [files]
+Add files to parity archive
+.TP
+parchive m(ix) [options]
+Try to restore from all parity files at once
+.TP
+parchive i(nteractive) [<par files>]
+Interactive mode (very bare-bones)
+.PP
+Options: (Can be turned off with '+')
+.TP
+\fB\-m\fR
+Move existing files out of the way
+.TP
+\fB\-f\fR
+Fix faulty filenames
+.TP
+\fB\-p\fR<n>
+Number of files per parity volume
+.TP
+\fB\-n\fR<n>
+Number of parity volumes to create
+.TP
+\fB\-d\fR
+Search for duplicate files
+.TP
+\fB\-k\fR
+Keep broken files
+.TP
+\fB\-s\fR
+Be smart if filenames are consistently different.
+.TP
+\fB\+i\fR
+Do not add following files to parity volumes
+.TP
+\fB\+c\fR
+Do not create parity volumes
+.TP
+\fB\+C\fR
+Ignore case in filename comparisons
+.TP
+\fB\+H\fR
+Do not check control hashes
+.TP
+\fB\-v\fR,\fB\+v\fR
+Increase or decrease verbosity
+.TP
+\fB\-h\fR,\fB\-?\fR
+Display this help
+.TP
+\fB\-\-\fR
+Always treat following arguments as files
+.SH "SEE ALSO"
+The full documentation (such as it is) for
+.B parchive
+is maintained on the web site at
+<http://sourceforge.net/docman/display_doc.php?docid=7717&group_id=30568>
+
+.SH AUTHOR
+This manual page was written by Rene Weber <rene_debmaint@elvenlord.com>,
+and edited by Vince Mulhollon <vlm@debian.org>,
+for the Debian GNU/Linux system (but may be used by others).