debian/0000755000000000000000000000000012211725171007165 5ustar debian/changelog0000644000000000000000000000464312211725037011047 0ustar rzip (2.1-2) unstable; urgency=low [ Daniel Echeverry ] * QA upload. * Switch compat level 4 to 9. * Switch to dpkg-source 3.0 (quilt) format. Closes: #664444 * Add debian/watch * debian/control + Set QA team as Maintainer + Remove dpatch in B-D + Add ${misc:Depends}. Closes: #715176 + Add Homepage field + Bump Standards-Version to 3.9.4 + Bump debhelper to 9 in B-D * debian/patches + Add 60fix_manpage.diff + Fix hyphen-used-as-minus-sign lintian warning + Fix some typos. Closes: #355835 + Add description in 50fhs.patch + Add 70hardeningflags.diff + Add CPPFLAGS, CFLAGS and LDFLAGS to use hardening flags * debian/copyright + Update to DEP5 copyright format 1.0 * debian/rules + Use new-style dh format * Add debian/rzip.clean + Clean up generate and build files [ Ryan Kavanagh ] * Remove Makefile and config.h on clean -- Daniel Echeverry Wed, 14 Aug 2013 21:46:23 -0500 rzip (2.1-1) unstable; urgency=low * New upstream fixes a bug that prevented some files from being uncompressed. Closes: #353109. * The man page in the previous version incorrectly stated the default compression level; this was a mistake while backporting changes for 2.0-2. The patch with the error has been removed and the man page again correctly states the default compression level (-6). Closes: #299327. * 10mod_time.dpatch from David Frey: preserve modification times. Closes: #315382. * 20long-options.dpatch: implement GNU-style long options. Closes: #297701. * 30man_spelling corrects a spelling error. Spotted by A Costa. Closes: #355835. * 40runzip.dpatch: link rzip to runzip as the bzip2 and gzip packages do. Closes: #319158. * 50fhs.dpatch: Don't install man pages into /usr/man. * Update standards version. * Provide a more enlightening description of rzip in debian/control. * Fixup copyright file to correctly attribute copyrights for md4.* and rzip.c. -- Alec Berryman Tue, 11 Apr 2006 23:28:05 +0100 rzip (2.0-2) unstable; urgency=medium * Fix to enable decompression of large sparsely-populated files (backported from CVS). Closes: #265200 -- Alec Berryman Sat, 21 Aug 2004 14:16:40 -0400 rzip (2.0-1) unstable; urgency=low * Initial packaging. Closes: #236690 -- Alec Berryman Sat, 10 Jul 2004 20:16:33 -0400 debian/rzip.manpages0000644000000000000000000000000712203053330011653 0ustar rzip.1 debian/compat0000644000000000000000000000000212203040432010352 0ustar 9 debian/rules0000755000000000000000000000065412204254501010246 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) %: dh $@ override_dh_auto_configure: dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man override_dh_auto_install: dh_auto_install -- prefix=$(CURDIR)/debian/rzip/usr debian/copyright0000644000000000000000000000310612211717576011132 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Andrew Tridgell Upstream-Name: rzip Source: http://rzip.samba.org/ftp/rzip/ Files: * Copyright: 1998-2006 Andrew Tridgell License: GPL-2.0+ Files: debian/* Copyright: 2004-2006 Alec Berryman 2013 Daniel Echeverry License: GPL-2.0+ Files: rzip.c Copyright: 1996 Andrew Tridgell 2003 Rusty Russell License: GPL-2.0+ Files: md4.c md4.h Copyright: 1997-1998 Andrew Tridgell 2002 Steve French (sfrench@us.ibm.com) 2002 David S. Miller (davem@redhat.com) 2002 James Morris 2002 Cryptoapi developers License: GPL-2.0+ License: GPL-2.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/patches/0000755000000000000000000000000012211725045010614 5ustar debian/patches/20long_options.patch0000644000000000000000000001534612203602111014507 0ustar Author: Alec Berryman Description: Implement GNU-style long options. --- a/main.c +++ b/main.c @@ -25,17 +25,18 @@ static void usage(void) printf("Copright (C) Andrew Tridgell 1998-2003\n\n"); printf("usage: rzip [options] \n"); printf(" Options:\n"); - printf(" -0 fastest (worst) compression\n"); - printf(" -6 default compression level\n"); - printf(" -9 slowest (best) compression\n"); - printf(" -d decompress\n"); - printf(" -o filename specify the output file name\n"); - printf(" -S suffix specify compressed suffix (default '.rz')\n"); - printf(" -f force overwrite of any existing files\n"); - printf(" -k keep existing files\n"); - printf(" -P show compression progress\n"); - printf(" -L level set compression level\n"); - printf(" -V show version\n"); + printf(" -0, --worst fastest (worst) compression\n"); + printf(" -6 default compression level\n"); + printf(" -9, --best slowest (best) compression\n"); + printf(" -d, --decompress decompress\n"); + printf(" -f, --force force overwrite of any existing files\n"); + printf(" -o, --output FILENAME specify the output file name\n"); + printf(" -k, --keep keep existing files\n"); + printf(" -L, --level LEVEL set compression level\n"); + printf(" -P, --progress show compression progress\n"); + printf(" -S, --suffix SUFFIX specify compressed suffix (default '.rz')\n"); + printf(" -v, --verbose increase verbosity\n"); + printf(" -V, --version show version\n"); #if 0 /* damn, this will be quite hard to do */ printf(" -t test compressed file integrity\n"); @@ -283,7 +284,25 @@ static void compress_file(struct rzip_co control.flags |= FLAG_DECOMPRESS; } - while ((c = getopt(argc, argv, "h0123456789dS:tVvkfPo:L:")) != -1) { + static struct option options[] = + { + { "level", required_argument, NULL, 'L' }, + { "decompress", no_argument, NULL, 'd' }, + { "suffix", required_argument, NULL, 'S' }, + { "output", required_argument, NULL, 'o' }, + { "force", no_argument, NULL, 'f' }, + { "keep", no_argument, NULL, 'k' }, + { "verbose", no_argument, NULL, 'v' }, + { "progress", no_argument, NULL, 'P' }, + { "version", no_argument, NULL, 'V' }, + { "best", no_argument, NULL, '9' }, + { "worst", no_argument, NULL, '0' }, + { "help", no_argument, NULL, 'h' } + }; + + while ((c = getopt_long(argc, argv, "h0123456789dS:tVvkfPo:L:", options, + NULL)) != -1) { + if (isdigit(c)) { control.compression_level = c - '0'; continue; --- a/rzip.h +++ b/rzip.h @@ -46,6 +46,7 @@ #include #include +#include #ifdef HAVE_CTYPE_H #include --- a/rzip.yo +++ b/rzip.yo @@ -14,52 +14,56 @@ manpagesection(OPTIONS SUMMARY) Here is a summary of the options to rzip. verb( - -0 fastest (worst) compression - -6 default compression - -9 slowest (best) compression - -d decompress - -o filename specify the output file name - -S suffix specify compressed suffix (default '.rz') - -f force overwrite of any existing files - -k keep existing files - -P show compression progress - -V show version +-0, --worst fastest (worst) compression +-6 default compression level +-9, --best slowest (best) compression +-d, --decompress decompress +-f, --force force overwrite of any existing files +-o, --output FILENAME specify the output file name +-k, --keep keep existing files +-L, --level LEVEL set compression level +-P, --progress show compression progress +-S, --suffix SUFFIX specify compressed suffix (default '.rz') +-v, --verbose increase verbosity +-V, --version show version ) manpageoptions() startdit() -dit(bf(-h)) Print an options summary page +dit(bf(-h --help)) Print an options summary page -dit(bf(-V)) Print the rzip version number +dit(bf(-V --version)) Print the rzip version number -dit(bf(-0..9)) Set the compression level from 0 to 9. The default is -to use level 6, which is a reasonable compromise between speed and -compression. The compression level is also strongly related to how much -memory rzip uses, so if you are running rzip on a machine with limited -amounts of memory then you will probably want to choose a smaller level. - -dit(bf(-d)) Decompress. If this option is not used then rzip looks at -the name used to launch the program. If it contains the string -'runzip' then the -d option is automatically set. - -dit(bf(-o)) Set the output file name. If this option is not set then -the output file name is chosen based on the input name and the -suffix. The -o option cannot be used if more than one file name is +dit(bf(-0 (or --worst) to -9 (or --best) --level)) Set the compression level +from 0 to 9. The default is to use level 6, which is a reasonable compromise +between speed and compression. The compression level is also strongly related +to how much memory rzip uses, so if you are running rzip on a machine with +limited amounts of memory then you will probably want to choose a smaller +level. + +dit(bf(-d --decompress)) Decompress. If this option is not used then +rzip looks at the name used to launch the program. If it contains the +string 'runzip' then the -d option is automatically set. + +dit(bf(-o --output)) Set the output file name. If this option is not +set then the output file name is chosen based on the input name and +the suffix. The -o option cannot be used if more than one file name is specified on the command line. -dit(bf(-S)) Set the compression suffix. The default is '.rz'. +dit(bf(-S --suffix)) Set the compression suffix. The default is '.rz'. -dit(bf(-f)) If this option is not specified then rzip will not +dit(bf(-f --force)) If this option is not specified then rzip will not overwrite any existing files. If you set this option then rzip will silently overwrite any files as needed. -dit(bf(-k)) If this option is not specified then rzip will delete the -source file after successful compression or decompression. When this -option is specified then the source files are not deleted. +dit(bf(-k --keep)) If this option is not specified then rzip will +delete the source file after successful compression or +decompression. When this option is specified then the source files are +not deleted. -dit(bf(-P)) If this option is specified then rzip will show the -percentage progress while compressing. +dit(bf(-P --progress)) If this option is specified then rzip will show +the percentage progress while compressing. enddit() debian/patches/50fhs.patch0000644000000000000000000000044712206444514012572 0ustar Author: Alec Berryman Description: Respect FHS for man placement --- a/Makefile.in +++ b/Makefile.in @@ -4,7 +4,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ INSTALL_BIN=$(exec_prefix)/bin -INSTALL_MAN=$(prefix)/man +INSTALL_MAN=$(prefix)/share/man LIBS=@LIBS@ CC=@CC@ debian/patches/60fix_manpage.diff0000644000000000000000000000661012204245010014064 0ustar Description: Fix hyphen-used-as-minus-sign lintian warning in manpage Forwarded: no Author: Daniel Echeverry Last-Update: 2013-08-17 --- a/rzip.1 +++ b/rzip.1 @@ -8,7 +8,7 @@ rzip [OPTIONS] .SH "DESCRIPTION" .PP rzip is a file compression program designed to do particularly -well on very large files containing long distance redundency\&. +well on very large files containing long distance redundancy\&. .PP .SH "OPTIONS SUMMARY" .PP @@ -17,16 +17,16 @@ Here is a summary of the options to rzip .nf - -0 fastest (worst) compression - -6 default compression - -9 slowest (best) compression - -d decompress - -o filename specify the output file name - -S suffix specify compressed suffix (default \&'\&.rz\&') - -f force overwrite of any existing files - -k keep existing files - -P show compression progress - -V show version + \-0 fastest (worst) compression + \-6 default compression + \-9 slowest (best) compression + \-d decompress + \-o filename specify the output file name + \-S suffix specify compressed suffix (default \&'\&.rz\&') + \-f force overwrite of any existing files + \-k keep existing files + \-P show compression progress + \-V show version .fi @@ -50,12 +50,12 @@ amounts of memory then you will probably .IP "\fB-d\fP" Decompress\&. If this option is not used then rzip looks at the name used to launch the program\&. If it contains the string -\&'runzip\&' then the -d option is automatically set\&. +\&'runzip\&' then the \-d option is automatically set\&. .IP .IP "\fB-o\fP" Set the output file name\&. If this option is not set then the output file name is chosen based on the input name and the -suffix\&. The -o option cannot be used if more than one file name is +suffix\&. The \-o option cannot be used if more than one file name is specified on the command line\&. .IP .IP "\fB-S\fP" @@ -90,7 +90,7 @@ first stage\&. .PP The key difference between rzip and other well known compression algorithms is its ability to take advantage of very long distance -redundency\&. The well known deflate algorithm used in gzip uses a +redundancy\&. The well known deflate algorithm used in gzip uses a maximum history buffer of 32k\&. The block sorting algorithm used in bzip2 is limited to 900k of history\&. The history buffer in rzip can be up to 900MB long, several orders of magnitude larger than gzip or @@ -102,7 +102,7 @@ home directories several users might hav of quite similar files\&. It is also common to have a single file that contains large duplicated chunks over long distances, such as pdf files containing repeated copies of the same image\&. Most compression -programs won\&'t be able to take advantage of this redundency, and thus +programs won\&'t be able to take advantage of this redundancy, and thus might achieve a much lower compression ratio than rzip can achieve\&. .PP .SH "HISTORY" @@ -132,7 +132,7 @@ rzip was written by Andrew Tridgell http://samba\&.org/~tridge/ .PP If you wish to report a problem or make a suggestion then please email -bugs-rzip@tridgell\&.net +bugs\-rzip@tridgell\&.net .PP rzip is released under the GNU General Public License version 2 or later\&. Please see the file COPYING for license details\&. debian/patches/10maintain_times.patch0000644000000000000000000000345312203042154014776 0ustar Author: David Frey Description: Maintain modification times. --- a/main.c +++ b/main.c @@ -128,6 +128,8 @@ static void decompress_file(struct rzip_ { int fd_in, fd_out = -1, fd_hist = -1; off_t expected_size; + struct stat sb; + struct utimbuf utb; if (control->outname) { control->outfile = strdup(control->outname); @@ -143,6 +145,8 @@ static void decompress_file(struct rzip_ control->outfile[strlen(control->infile) - strlen(control->suffix)] = 0; } + stat(control->infile,&sb); + fd_in = open(control->infile,O_RDONLY); if (fd_in == -1) { fatal("Failed to open %s: %s\n", @@ -190,6 +194,10 @@ static void decompress_file(struct rzip_ } } + utb.actime=sb.st_atime; + utb.modtime=sb.st_mtime; + utime(control->outfile,&utb); + free(control->outfile); } @@ -199,6 +207,8 @@ static void decompress_file(struct rzip_ static void compress_file(struct rzip_control *control) { int fd_in, fd_out; + struct stat sb; + struct utimbuf utb; if (strlen(control->suffix) <= strlen(control->infile) && strcmp(control->suffix, control->infile + strlen(control->infile) - strlen(control->suffix)) == 0) { @@ -218,6 +228,8 @@ static void compress_file(struct rzip_co strcat(control->outfile, control->suffix); } + stat(control->infile,&sb); + fd_in = open(control->infile,O_RDONLY); if (fd_in == -1) { fatal("Failed to open %s: %s\n", control->infile, strerror(errno)); @@ -248,6 +260,10 @@ static void compress_file(struct rzip_co } } + utb.actime=sb.st_atime; + utb.modtime=sb.st_mtime; + utime(control->outfile,&utb); + free(control->outfile); } --- a/rzip.h +++ b/rzip.h @@ -33,6 +33,8 @@ #include #include #include +#include +#include #ifdef HAVE_STRING_H #include debian/patches/40runzip.patch0000644000000000000000000000077312203042156013333 0ustar Author: Alec Berryman Description: Link rzip to runzip for easier unrzipping. --- a/Makefile.in +++ b/Makefile.in @@ -33,8 +33,10 @@ man: rzip.1 install: all -mkdir -p ${INSTALL_BIN} ${INSTALLCMD} -m 755 rzip ${INSTALL_BIN} + ln ${INSTALL_BIN}/rzip ${INSTALL_BIN}/runzip -mkdir -p ${INSTALL_MAN}/man1 ${INSTALLCMD} -m 644 $(srcdir)/rzip.1 ${INSTALL_MAN}/man1/ + ln ${INSTALL_MAN}/man1/rzip.1 ${INSTALL_MAN}/man1/runzip.1 rzip: $(OBJS) $(CC) $(CFLAGS) -o rzip $(OBJS) $(LIBS) debian/patches/30man_spelling.patch0000644000000000000000000000060612204245214014447 0ustar Author: Alec Berryman Description: Spelling error. --- a/rzip.yo +++ b/rzip.yo @@ -8,7 +8,7 @@ rzip [OPTIONS] manpagedescription() rzip is a file compression program designed to do particularly -well on very large files containing long distance redundency. +well on very large files containing long distance redundancy. manpagesection(OPTIONS SUMMARY) debian/patches/series0000644000000000000000000000020512211725045012026 0ustar 10maintain_times.patch 20long_options.patch 30man_spelling.patch 40runzip.patch 50fhs.patch 60fix_manpage.diff 70hardeningflags.diff debian/patches/70hardeningflags.diff0000644000000000000000000000130412206457231014572 0ustar Description: Add CPPFLAGS, CFLAGS and LDFLAGS to use hardening flags Forwarded: No Author: Daniel Echeverry Last-Update: 2013-08-25 --- a/Makefile.in +++ b/Makefile.in @@ -24,7 +24,7 @@ OBJS= rzip.o runzip.o main.o stream.o ut # note that the -I. is needed to handle config.h when using VPATH .c.o: - $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@ + $(CC) -I. -I$(srcdir) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ all: rzip @@ -39,7 +39,7 @@ install: all ln ${INSTALL_MAN}/man1/rzip.1 ${INSTALL_MAN}/man1/runzip.1 rzip: $(OBJS) - $(CC) $(CFLAGS) -o rzip $(OBJS) $(LIBS) + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o rzip $(OBJS) $(LIBS) rzip.1: rzip.yo yodl2man -o rzip.1 rzip.yo debian/clean0000644000000000000000000000002212211724756010174 0ustar Makefile config.h debian/rzip.clean0000644000000000000000000000002212206445255011155 0ustar Makefile config.h debian/control0000644000000000000000000000117512203605223010570 0ustar Source: rzip Section: utils Priority: optional Maintainer: Debian QA Group Build-Depends: debhelper (>= 9), libbz2-dev (>= 1.0.2) Standards-Version: 3.9.4 Homepage: http://rzip.samba.org/ Package: rzip Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: compression program for large files rzip is a compression program able to take advantage of long distance redundancies in files, allowing greater compression ratios. rzip uses a history buffer of up to 900MB, while gzip uses 32KB and bzip2 uses 900KB. rzip cannot read from the standard input or write to the standard output. debian/source/0000755000000000000000000000000012203041572010462 5ustar debian/source/format0000644000000000000000000000001412203042153011664 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000036212204247534010223 0ustar version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$// \ http://rzip.samba.org/ftp/rzip/ (?:.*/)?rzip[_\-\.]?(\d\S*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz))