Update to 2.5.1
Changelog: Version 2.5.1: (This version folds in all non-debian specific bug fixes and feature extensions, with respect to 2.5, that were made in the Debian afio package 2.5-6) (This version does not incorporate fixes for all bug reports or feature requests I got since afio 2.5: some of these remain on the todo list) Fixed a file descriptor handling bug that caused gzip subprocess to keep running when afio -oZ is killed or crashes. Based on bug report and patch by Alain Spineux. Fixed bug that could cause afio -oZ to hang, and/or write faulty data without warning, if a large file was modified while being written. The bug fix prevents hanging, and introduces warnings when faulty data might be written. Based on bug report and patch by Alain Spineux. Improved error reporting in -r operation, based on discussions with Alain Spineux. Note that the error message text is all changed now, to be more verbose and explanatory, so scripts that grep the message text have to be rewritten. Verfication reporting via exit code 0/1 is unchanged, unless the -1 r flag is used. Added -1 r flag to ignore certain warnings when verifying the backup of a live filesystem. Based on discussions with Alain Spineux. Changed 'diff -u0' into 'diff -U 0' in regtest.do script in order to be compatible with command line argument parsing of newer gnu diff versions. Also added sort commands to sort find output because when order changes with respect to order in which files where created, this gives false fail on the hardlink check part of regression test. Based on problem reports by Dallas Legan, Shlomi Levi. Added defines to compile under CYGWIN based on patches by Dirk Eddelbuettel and Jari Aalto. Fixed bug in test script, that triggered when find(1) listed files in a different order than the order in which afio unpacked then into the directory. This bug cause the test script to report failure even though there was no failure. Bug reported by Andre Francois, also by Fred Wright and Bruce Bowler. Fixed bugs in test script, having to do with 'bash -c' and 'source' not being ablre to find the dircomp and dircompare commands, that were reported openSuse 10.3 and 11.4. (I have been unable to reproduce the bugs in my environment, so I hope the fixes work.) Bugs reported and fixes proposed by Fred Wright. Added .ogg as an extensions to the list of those to be excluded from compression by default. Proposed by Dirk Eddelbuettel. Fixed logic in in() to correctly report failure with a warning message when uncompression of a commpressed-archived file fails. Also fixes that, potentially valid archive data would be skipped after this error. Based on bug report by Daniel Webb. In next(), changed msg to variable-length string, to avoid possible buffer overflow. Part of the patch by Erik Schanze (downstream Debian). Extended -0 option to influence -t processing and -w and -W file reading too. The -0 option now toggles when used multiple times. Added -7 option to disable/enable globbing in processing -yYwW filename patterns. Based on feature request and patch by Christian Schrader (via Debian). Note that the semantics of the -7 command line options is sligtly different than it was in the Debian 2.5-3 to 2.5-6 branches: in those branches, -7 was non-toggling so it was not necessary to supply the -7 before any -yYwW options it should affect. Replaced several 0 by NULL to avoid compiler warnings. Based on patch by Erik Schanze (downstream Debian). Replaced sys_errlist usage by strerror(3). This avoids (on some systems) compiler warnings about sys_errlist being obsolete. Left in the old code (with #if 0) to ease porting. Based on patch by Erik Schanze (downstream Debian) and report by Mike Black. Fixed bug in gpg usage examples in script3/, and removed script5/ which had the same bug. Bug reported, and bug fix found, by Marcus Williams. Also added info on this to the manpage. In the earlier scripts, the built-in compression feature of gpg was used, but it turns out that this cannot be reliably used with afio: it should be disabled using the -z 0 option to gpg. The reason why gpg built-in compression cannot be used is as follows. When compression is used, and gpg is run twice on the same input file, it can generate differing outputs with different lengths. This is a problem for afio if the output length is larger than the afio -M option value. If the length is larger than the -M value, then afio will call the 'compression' program twice, once to get the 'compressed' file length and once to get the actual file contents and write them to the archive, and if the lenght is bigger in the second run then the data in the archive will be truncated (and therefore corrupted). Afio does emit an error message when this happens, but it might be overlooked. Some caveats: in testing it looks like if -z 0 is used with gpg, it will never produce different-length files for the same input, but I can not find anything in the documentation of gpg suggesting that this is a guaranteed feature. pgp (the non-GNU implementation) might has a similar different-length behavior causing afio to fail occasionally, but I have found no reports on the web about this. (An alternative would be to use openssl as the encryption engine??) Updated legal information for redistributers about the afio license in afio.c and in the .lsm files. Removed earlier text concluding that by Linux Software Map standards, the correct afio license label was LGPL. Added the text file afio_license_issues_v5.txt. All of this was triggerd by a blog entry writen by Tom Callaway, and informed in part by further discussion in the blog comment section and on some Debian mailing lists. Thanks to Mark Brukhartz for going on record to clarify the intent of the original license text. Increase default size for -M option from 2 to 250 megabytes.
This commit is contained in:
parent
47a9ef0e8e
commit
2d000c4a6b
4 changed files with 39 additions and 107 deletions
|
@ -1,9 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.15 2015/02/15 14:29:02 ryoon Exp $
|
||||
# $NetBSD: Makefile,v 1.16 2015/02/15 14:45:48 ryoon Exp $
|
||||
|
||||
DISTNAME= afio-2.5
|
||||
PKGREVISION= 2
|
||||
DISTNAME= afio-2.5.1
|
||||
CATEGORIES= archivers
|
||||
MASTER_SITES= http://www.ibiblio.org/pub/Linux/system/backup/
|
||||
MASTER_SITES= http://members.chello.nl/~k.holtman/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.7 2012/06/23 18:02:15 dholland Exp $
|
||||
$NetBSD: distinfo,v 1.8 2015/02/15 14:45:48 ryoon Exp $
|
||||
|
||||
SHA1 (afio-2.5.tgz) = 051765f209fded60f94944da8a76ae37c3423a23
|
||||
RMD160 (afio-2.5.tgz) = 991bdb794ee8b4b7e6a737afa85009aae925699d
|
||||
Size (afio-2.5.tgz) = 179184 bytes
|
||||
SHA1 (afio-2.5.1.tgz) = bff6b9a147dc5b0e6bd7f1a76f0b84e4dd9a7dc9
|
||||
RMD160 (afio-2.5.1.tgz) = 923981a9e6766781705ceedecd3d86afa5b9abae
|
||||
Size (afio-2.5.1.tgz) = 191765 bytes
|
||||
SHA1 (patch-aa) = e35b47c2f10a6f80d8446e4c22a7a023dae55933
|
||||
SHA1 (patch-ab) = 746c0eaf036cba60fb48e798175e055df6addd77
|
||||
SHA1 (patch-ac) = 99378318e898429153352a2d9b47008f419865af
|
||||
SHA1 (patch-ab) = a93cf92b80f2b40e30987822b144c24f3a3e5c1e
|
||||
SHA1 (patch-ac) = d589b2e37d8a81373f14e4093fe8cc2b30b5489b
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
$NetBSD: patch-ab,v 1.3 2012/06/23 18:02:15 dholland Exp $
|
||||
$NetBSD: patch-ab,v 1.4 2015/02/15 14:45:48 ryoon Exp $
|
||||
|
||||
- Use NAME_MAX if available rather than relying on MAXNAMLEN.
|
||||
- Fix Solaris preprocessor symbols.
|
||||
- Fix bad calls to execlp() that break on 64-bit platforms.
|
||||
|
||||
--- compfile.c.orig 2003-06-24 21:32:20.000000000 +0000
|
||||
--- compfile.c.orig 2012-02-05 13:45:01.000000000 +0000
|
||||
+++ compfile.c
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
@ -14,25 +14,16 @@ $NetBSD: patch-ab,v 1.3 2012/06/23 18:02:15 dholland Exp $
|
|||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -179,7 +180,7 @@ int setupgzip(char *name)
|
||||
if (open (name, O_RDONLY) >= 0)
|
||||
{
|
||||
if(! compressargs)
|
||||
- execlp (compressprog, compressprog, "-c", farg, 0);
|
||||
+ execlp (compressprog, compressprog, "-c", farg, (char *)NULL);
|
||||
else
|
||||
execvp (compressprog, compress_arg_list);
|
||||
}
|
||||
@@ -210,7 +211,7 @@ void waitforgzip()
|
||||
@@ -211,7 +212,7 @@ void waitforgzip()
|
||||
* version;
|
||||
*/
|
||||
|
||||
-#if ( defined(sun) && defined(__svr4__) )
|
||||
+#if ( defined(__sun) && defined(__SVR4) )
|
||||
-#if ( defined(sun) && defined(__svr4__) ) || defined(__CYGWIN32__)
|
||||
+#if ( defined(__sun) && defined(__svr4__) ) || defined(__CYGWIN32__)
|
||||
#include <dirent.h>
|
||||
#else
|
||||
#include <sys/dir.h>
|
||||
@@ -283,7 +284,9 @@ compressfile (int *fdp, char *name, reg
|
||||
@@ -284,7 +285,9 @@ compressfile (int *fdp, char *name, reg
|
||||
tmpcomp++;
|
||||
else
|
||||
tmpcomp = name;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
||||
$NetBSD: patch-ac,v 1.3 2015/02/15 14:45:48 ryoon Exp $
|
||||
|
||||
- Use standard headers.
|
||||
- Use strerror, not sys_errlist and sys_nerr.
|
||||
|
@ -8,32 +8,18 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
- Build fix for makedev() on Solaris and Interix.
|
||||
- Fix bad calls to execlp() that break on 64-bit platforms.
|
||||
|
||||
--- afio.c.orig 2003-12-20 22:16:13.000000000 +0000
|
||||
--- afio.c.orig 2012-02-05 13:25:57.000000000 +0000
|
||||
+++ afio.c
|
||||
@@ -166,52 +166,40 @@ static char *ident = "$Header: /u/buhrt/
|
||||
#include <signal.h>
|
||||
#include <strings.h>
|
||||
#include <sys/wait.h>
|
||||
-#define linux_tstamp 1
|
||||
-/* fix SunOS errno.h not declaring what the manpage says it declares
|
||||
- bogosity. */
|
||||
- extern int sys_nerr;
|
||||
- extern char *sys_errlist[];
|
||||
-#endif
|
||||
-
|
||||
-#ifdef hpux
|
||||
- /* Fix that HPUX dosent have sys_nerr or sys_errlist
|
||||
- Added by Daniel Andersson, daniel.andersson@sto.sema.se
|
||||
- */
|
||||
-extern int sys_nerr;
|
||||
-extern char *sys_errlist[];
|
||||
#endif
|
||||
@@ -166,7 +166,7 @@ static char *ident = "$Header: /u/buhrt/
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
-#include <sys/signal.h>
|
||||
+#include <signal.h>
|
||||
-#ifdef sun
|
||||
+#ifdef __sun
|
||||
#include <sys/types.h>
|
||||
#include <utime.h>
|
||||
#include <signal.h>
|
||||
@@ -202,30 +202,29 @@ extern char *sys_errlist[];
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -44,7 +30,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
#include "patchlevel.h"
|
||||
|
||||
#ifdef linux
|
||||
-
|
||||
|
||||
-#define linux_tstamp 1
|
||||
-
|
||||
-#include <utime.h>
|
||||
|
@ -60,9 +46,6 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
+/* nothing should need this */
|
||||
+/*#define broken_utime*/
|
||||
+
|
||||
#ifndef major
|
||||
-#ifdef sun
|
||||
+#if defined(sun) || defined(__INTERIX)
|
||||
|
@ -73,7 +56,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
#else
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
@@ -1122,7 +1110,7 @@ savedirstamp (char *name, time_t mtime)
|
||||
@@ -1140,7 +1139,7 @@ savedirstamp (char *name, time_t mtime)
|
||||
STATIC void
|
||||
restoredirstamps (void)
|
||||
{
|
||||
|
@ -82,7 +65,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
auto struct utimbuf tstamp;
|
||||
#else
|
||||
auto time_t tstamp[2];
|
||||
@@ -1130,7 +1118,7 @@ restoredirstamps (void)
|
||||
@@ -1148,7 +1147,7 @@ restoredirstamps (void)
|
||||
Dir *DirP_forw;
|
||||
while(DirP!=NULL)
|
||||
{
|
||||
|
@ -91,7 +74,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
tstamp.actime = DirP->d_mtime;
|
||||
tstamp.modtime = DirP->d_mtime;
|
||||
/* no error code checking on purpose */
|
||||
@@ -1212,7 +1200,7 @@ readcheck (av)
|
||||
@@ -1239,7 +1238,7 @@ readcheck (av)
|
||||
auto char name[PATHSIZE];
|
||||
auto char local[PATHSIZE];
|
||||
int sel, res;
|
||||
|
@ -100,7 +83,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
auto struct utimbuf tstamp;
|
||||
#else
|
||||
auto time_t tstamp[2];
|
||||
@@ -1241,7 +1229,7 @@ readcheck (av)
|
||||
@@ -1267,7 +1266,7 @@ readcheck (av)
|
||||
if(aflag && atime_sb_valid && ((sb.sb_mode & S_IFMT)==S_IFREG))
|
||||
{
|
||||
/* reset access time, this distroys the ctime btw. */
|
||||
|
@ -109,16 +92,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
tstamp.actime = atime_sb.sb_atime;
|
||||
tstamp.modtime = atime_sb.sb_mtime;
|
||||
VOID utime (name, &tstamp);
|
||||
@@ -1585,7 +1573,7 @@ incheckdata (int fd, off_t size, char *n
|
||||
if(compressargs)
|
||||
execvp (compressprog, compress_arg_list);
|
||||
else
|
||||
- execlp (compressprog, compressprog, "-d", "-c", 0);
|
||||
+ execlp (compressprog, compressprog, "-d", "-c", (char *)NULL);
|
||||
fprintf (stderr, "Could not uncompress, errno %d\n", errno);
|
||||
exit(1);
|
||||
break;
|
||||
@@ -1696,7 +1684,7 @@ inentry (name, asb)
|
||||
@@ -1758,7 +1757,7 @@ inentry (name, asb)
|
||||
reg Link *linkp;
|
||||
reg int ifd;
|
||||
reg int ofd;
|
||||
|
@ -127,7 +101,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
auto struct utimbuf tstamp;
|
||||
#else
|
||||
auto time_t tstamp[2];
|
||||
@@ -1729,7 +1717,7 @@ inentry (name, asb)
|
||||
@@ -1794,7 +1793,7 @@ inentry (name, asb)
|
||||
/* Cannot set utime on symlink (at least not under Linux) */
|
||||
if((asb->sb_mode & S_IFMT) != S_IFLNK)
|
||||
{
|
||||
|
@ -136,25 +110,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
tstamp.actime = tstamp.modtime = mflag ? timenow : asb->sb_mtime;
|
||||
VOID utime (name, &tstamp);
|
||||
#else
|
||||
@@ -3004,7 +2992,7 @@ opencontrolscript (char *name)
|
||||
VOID dup (pfd[0]);
|
||||
VOID close (pfd[0]);
|
||||
|
||||
- execlp (controlscript, controlscript, label, 0);
|
||||
+ execlp (controlscript, controlscript, label, (char *)NULL);
|
||||
|
||||
warnarch("Problems running control script:",(off_t)0);
|
||||
warn(controlscript,syserr());
|
||||
@@ -3266,7 +3254,7 @@ openotty (name, asb, linkp, ispass, dozf
|
||||
if(compressargs)
|
||||
execvp (compressprog, compress_arg_list);
|
||||
else
|
||||
- execlp (compressprog, compressprog, "-d", "-c", 0);
|
||||
+ execlp (compressprog, compressprog, "-d", "-c", (char *)NULL);
|
||||
fprintf (stderr, "Could not uncompress, errno %d\n", errno);
|
||||
exit (1);
|
||||
}
|
||||
@@ -3493,7 +3481,7 @@ out (av)
|
||||
@@ -3580,7 +3579,7 @@ out (av)
|
||||
auto char name[PATHSIZE];
|
||||
auto char fsname[PATHSIZE];
|
||||
auto int compression;
|
||||
|
@ -163,7 +119,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
auto struct utimbuf tstamp;
|
||||
#else
|
||||
auto time_t tstamp[2];
|
||||
@@ -3638,7 +3626,7 @@ out (av)
|
||||
@@ -3750,7 +3749,7 @@ out (av)
|
||||
if(aflag && *fsname && ((sb.sb_mode & S_IFMT)==S_IFREG))
|
||||
{
|
||||
/* reset access time, this distroys the ctime btw. */
|
||||
|
@ -172,7 +128,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
tstamp.actime = sb.sb_atime;
|
||||
tstamp.modtime = sb.sb_mtime;
|
||||
VOID utime (fsname, &tstamp);
|
||||
@@ -4133,7 +4121,7 @@ passitem (from, asb, ifd, dir)
|
||||
@@ -4251,7 +4250,7 @@ passitem (from, asb, ifd, dir)
|
||||
{
|
||||
reg int ofd;
|
||||
|
||||
|
@ -181,7 +137,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
auto struct utimbuf tstamp;
|
||||
#else
|
||||
auto time_t tstamp[2];
|
||||
@@ -4149,7 +4137,7 @@ passitem (from, asb, ifd, dir)
|
||||
@@ -4267,7 +4266,7 @@ passitem (from, asb, ifd, dir)
|
||||
continue;
|
||||
if (ofd > 0)
|
||||
passdata (from, ifd, to, ofd);
|
||||
|
@ -190,21 +146,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
tstamp.actime = tstamp.modtime = mflag ? timenow : asb->sb_mtime;
|
||||
VOID utime (to, &tstamp);
|
||||
#else
|
||||
@@ -4354,12 +4342,7 @@ fswrite (fd, buf, len)
|
||||
STATIC char *
|
||||
syserr ()
|
||||
{
|
||||
- static char msg[40];
|
||||
-
|
||||
- if (errno > 0 && errno < sys_nerr)
|
||||
- return ((char *) sys_errlist[errno]);
|
||||
- VOID sprintf (msg, "Unknown error (errno %d)", errno);
|
||||
- return (msg);
|
||||
+ return strerror(errno);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4765,7 +4748,7 @@ xwait (pid, what, compstat2)
|
||||
@@ -4901,7 +4900,7 @@ xwait (pid, what, compstat2)
|
||||
char *what;
|
||||
int compstat2;
|
||||
{
|
||||
|
@ -213,7 +155,7 @@ $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $
|
|||
reg Child *cp;
|
||||
reg Child **acp;
|
||||
auto char why[100];
|
||||
@@ -4782,16 +4765,16 @@ xwait (pid, what, compstat2)
|
||||
@@ -4918,16 +4917,16 @@ xwait (pid, what, compstat2)
|
||||
free ((char *) cp);
|
||||
if (status == 0)
|
||||
return (0);
|
||||
|
|
Loading…
Reference in a new issue