Subject: pkg/22110: sysutil/rdiff-backup pkg update to 0.12.0
To: None <gnats-bugs@gnats.netbsd.org>
From: None <andreas@planix.com>
List: netbsd-bugs
Date: 07/09/2003 11:00:27
>Number:         22110
>Category:       pkg
>Synopsis:       sysutil/rdiff-backup pkg update to 0.12.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 09 15:01:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Wrede <andreas@planix.com>
>Release:        NetBSD 1.6T
>Organization:
Planix, Inc.
>Environment:
	
	
System: NetBSD woffi.planix.com 1.6T NetBSD 1.6T (WOFFI) #0: Thu May 22 14:59:30 EDT 2003 root@woffi.planix.com:/m5/netbsd-current/obj/sys/arch/i386/compile.i386/WOFFI i386
Architecture: i386
Machine: i386
>Description:
	The attached patch upgrades the rdiff-backup pkg from version 0.10.2 to 0.12.0
	Note that patches/patch-aa is no longer needed
	Note also that version 0.11.1 and newer cannot interoperate 
	with earlier verion or rdiff-backup. 
>How-To-Repeat:
	
>Fix:
	
Apply patch below. 

Relevant lines from CHANGELOG
--[CUT]---
New in v0.12.0 (2003/06/26)
---------------------------

Fixed (?) bug that caused crash when file changes type from regular
file in middle of download (reported by Ty! Boyack).

Failure to construct regular file in regression/restoration only
causes warning, not fatal error.

Removed --exclude-mirror option.  (Probably no one uses this, and it
adds clutter.)

--include and --exclude options should work now with restores, with
some speed penalty.


New in v0.11.5 (2003/06/20)
---------------------------

Added EDEADLOCK to the list of skippable errors.  (Thanks to Dave
Kempe for report.)

Added --list-at-time option at request of Farkas Levente.

Various fixes for backing up onto windows directories.  Thanks to
Keith Edmunds for bug reports and testing.

Fixed possible crash when a file would be deleted while being
processed (reported by Robert Weber).

Handle better cases when there are two files with the same name in the
same directory.

Added --windows-restore switch, for use when when restoring from a
windows-style file system to a normal one.  Use --windows-mode when
backing up.

Scott Bender's patch fixes backing up hard links when first linked
file is quoted.


New in v0.11.4 (2003/03/15)
---------------------------

Fixed bug incrementing sockets whose filenames were pretty long, but
not super long.  Reported by Olivier Mueller.

Added Albert Chin-A-Young's patch to add a few options to the setup.py
install script.

Apparently fixed rare utime type bug.  Thanks to Christian Skarby for
report and testing.

Added detailed file_statistics (in addition to session_statistics) as
requested by Dean Gaudet.  Disable with --no-file-statistics option.

Minor speed enhancements.


New in v0.11.3 (2003/03/04)
---------------------------

Fixed a number of bugs reported by Olivier Mueller:

	Brought some old parts of the man page up-to-date.

	Fixed bug if unrecoverable error on second backup to a directory.

	Fixed spurious error message that could appear after a successful
	backup.

	--print-statistics option works again (before it would silently
	ignored).

	Fixed cache pipeline overflow bug.  This error could appear on
	large remote backups when many files have not changed.


New in v0.11.2 (2003/03/01)
---------------------------

Fixed seg fault bug reported by a couple sparc/openbsd users.  Thanks
to Dave Steinberg for giving me an account on his system for testing.

Re-enabled --windows-mode and filename quoting.

Fixed selection bug:  In 0.11.1, files which were included in one
backup would be automatically included in the next.  Now you can
include/exclude files session-by-session.

Fixed ownership compare bug:  In 0.11.1, backups where the destination
side was not root would preserve ownership information by recording it
in the metadata file.  However, mere ownership changes would not
trigger creation of new increments.  This has been fixed.

Added the --no-inode-compare switch.  You probably don't need to use
it though.

If a special file cannot be created on the destination side, a 0
length regular file will be written instead as a placeholder.
(Restores should work fine because of the metadata file.)

Yet another error handling strategy (hopefully this is the last one
for a while, because this stuff isn't very exciting, and takes a long
time to write):

	All recoverable errors are classified into one of three groups:
	ListErrors, UpdateErrors, and SpecialFileErrors.  rdiff-backup's
	reaction to each error is more formally defined (see the error
	policy page, currently at
	http://rdiff-backup.stanford.edu/error_policy.html).

	rdiff-backup makes no attempt to recover or clean up after
	unrecoverable errors.

	However, it now uses fsync() to increment the destination
	directory in a reversable way.  If there is an error, the next
	backup will regress the destination directory into its state
	before the aborted backup.

	The above process can be done without a backup with the
	--check-destination-dir option.

Improved error logging.  Instead of the old haphazard reporting
method, which sometimes didn't indicate the file an error occurred on,
now all recoverable errors are reported in a standard format and also
written to the error_log.<time>.data file in the rdiff-backup-data
directory.  Thanks to Dean Gaudet and others for repeatedly bugging me
about this.


New in v0.11.1 (2002/12/31)
---------------------------

**Warning** Various features have been removed from this version, so
this is not a safe upgrade.  Also this version has less error
checking, and, if it crashes, this version may be more prone to leave
the destination directory in an inconsistent state.  I plan to look at
these issues in the next version.  Also, this version is quite
different from previous ones, so you cannot run version 0.11.1 on one
end of a connection and any previous version on the other side.

The following features have been removed:

	--mirror-only option:  If you just want to mirror something, use
	rsync.  (Or you could use rdiff-backup and then just delete the
	rdiff-backup-data directory, and then update the root mtime.)

	--change-source-perms option:  This feature was pretty complicated
	to implement, and if something happened to rdiff-backup during a
	transfer, the old permissions could not be restored.

	All "resume" related functionality, like --checkpoint-interval:
	This was complicated to implement, and didn't seem to work all
	that well.

	Directory statistics file:  Although the session statistics file is
	still generated, the directory statistics file no longer is,
	because the new code structure makes it less inconvenient.

	The various --exclude and --include options no longer work when
	restoring.  This may be added later if there is demand.

	--windows-mode and filename quoting doesn't work.  There have been
	several requests for this in the past, so it will probably be
	re-added in the next version.

Extensive refactoring.  A lot of rdiff-backup's code was structured as
if it were still in one file, so it didn't make enough use of Python's
module system.

Now rdiff-backup writes metadata (uid, gid, mtime, etc.) to a
compressed text file in the rdiff-backup-data directory.  Here are
some ramifications:

	A user does not need root access on the destination side to record
	file ownership information.

	Some files may be recognized as not having changed based on this
	metadata, so it may not be necessary to traverse the whole mirror
	directory.  This can reduce file access on the destination side.

	Even when the --no-hard-links option is given when backing up,
	link relationships can be restored properly.  However, if this
	option is given, mirror files will not be linked together.

	Special file types like device and sockets which cannot be created
	on the remote side for some reason can still be backed up and
	restored properly.

Fixed bug with the --{include|exclude}-globbing-filelist options
(reported by Claus Herwig).

Added --list-changed-since option to list the files changed since the
given date, and added Bud Bruegger's patch to that.  The format and
information this option provides will probably change in the near
future.

Restoring is now pipelined for better high latency performance, and
unchanged files in the target directory will not be recopied.


New in v0.11.0 (2002/10/05)
---------------------------

If get a socket error from trying to create a socket whose name is too
long, just skip file instead of exiting with error (bug report by Ivo
De Decker).

Added --exclude-special-files switch, which excludes fifos, symlinks,
sockets, and device files.

--windows-mode is now short for --windows-time-format --chars-to-quote
A-Z: --no-hard-links --exclude-special-files.  Thanks to Paul-Erik
Törrönen for some helpful windows info.

Multiple --include and --exclude statements can now be given in a
single file.  See the documentation on
--{include|exclude}-globbing-filelist.  Thanks to Henrik Lewander for
pointing out that command line length could otherwise be a problem.

Fixed bug in filelist processing that ignored leading or trailing
whitespace in filelists.  Now filenames with, for instance, trailing
spaces can be used in filelists.  Filelists which took advantage of
this bug for formatting may have to be editted.

Applied major/minor patch contributed by David S.  rdiff-backup should
now correctly copy device files on platforms such as NetBSD.

It is now possible to restore from a read-only filesystem (before
rdiff-backup would fail when trying to open log file).  Thanks to
Gregor Zattler for bug report.

Fixed bug that prevented certain restores when the source directory
was specified with a trailing backslash.

Added a bit more logging so it should be apparent which file was being
processed when an error occurs (thanks to Gerd Knops for suggestion).

Fixed bug when using --chars-to-quote and directory deleted that has
quoted characters in it.

--[CUT]---

The patch:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/rdiff-backup/Makefile,v
retrieving revision 1.2
diff -u -u -r1.2 Makefile
--- Makefile	2003/03/22 01:03:09	1.2
+++ Makefile	2003/07/09 14:31:52
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.2 2003/03/22 01:03:09 wiz Exp $
 #
 
-DISTNAME=	rdiff-backup-0.10.2
+DISTNAME=	rdiff-backup-0.12.0
 CATEGORIES=	sysutils net
 MASTER_SITES=	http://rdiff-backup.stanford.edu/
 
@@ -12,16 +12,12 @@
 PYTHON_VERSION_REQD=	22
 USE_BUILDLINK2=		yes
 
-post-patch:
-	@${SED} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
-		< ${WRKSRC}/setup.py > ${WRKSRC}/local_setup.py
-
 do-build:
-	cd ${WRKSRC}; ${PYTHONBIN} local_setup.py build
+	cd ${WRKSRC}; ${PYTHONBIN} setup.py build --librsync-dir=${PREFIX}
 
 do-install:
-	cd ${WRKSRC}; ${PYTHONBIN} local_setup.py install \
-		--prefix=${PREFIX} --skip-build
+	cd ${WRKSRC}; ${PYTHONBIN} setup.py install \
+		--prefix=${PREFIX} --librsync-dir=${PREFIX} --skip-build
 
 .include "../../devel/librsync/buildlink2.mk"
 .include "../../lang/python/application.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/rdiff-backup/PLIST,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 PLIST
--- PLIST	2002/10/15 15:16:02	1.1.1.1
+++ PLIST	2003/07/09 14:31:52
@@ -9,25 +9,23 @@
 lib/python2.2/site-packages/rdiff_backup/Hardlink.pyc
 lib/python2.2/site-packages/rdiff_backup/Main.py
 lib/python2.2/site-packages/rdiff_backup/Main.pyc
-lib/python2.2/site-packages/rdiff_backup/MiscStats.py
-lib/python2.2/site-packages/rdiff_backup/MiscStats.pyc
 lib/python2.2/site-packages/rdiff_backup/Rdiff.py
 lib/python2.2/site-packages/rdiff_backup/Rdiff.pyc
 lib/python2.2/site-packages/rdiff_backup/Security.py
 lib/python2.2/site-packages/rdiff_backup/Security.pyc
 lib/python2.2/site-packages/rdiff_backup/SetConnections.py
 lib/python2.2/site-packages/rdiff_backup/SetConnections.pyc
+lib/python2.2/site-packages/rdiff_backup/TempFile.py
+lib/python2.2/site-packages/rdiff_backup/TempFile.pyc
 lib/python2.2/site-packages/rdiff_backup/Time.py
 lib/python2.2/site-packages/rdiff_backup/Time.pyc
 lib/python2.2/site-packages/rdiff_backup/__init__.py
 lib/python2.2/site-packages/rdiff_backup/__init__.pyc
 lib/python2.2/site-packages/rdiff_backup/_librsync.so
+lib/python2.2/site-packages/rdiff_backup/backup.py
+lib/python2.2/site-packages/rdiff_backup/backup.pyc
 lib/python2.2/site-packages/rdiff_backup/connection.py
 lib/python2.2/site-packages/rdiff_backup/connection.pyc
-lib/python2.2/site-packages/rdiff_backup/destructive_stepping.py
-lib/python2.2/site-packages/rdiff_backup/destructive_stepping.pyc
-lib/python2.2/site-packages/rdiff_backup/highlevel.py
-lib/python2.2/site-packages/rdiff_backup/highlevel.pyc
 lib/python2.2/site-packages/rdiff_backup/increment.py
 lib/python2.2/site-packages/rdiff_backup/increment.pyc
 lib/python2.2/site-packages/rdiff_backup/iterfile.py
@@ -40,10 +38,12 @@
 lib/python2.2/site-packages/rdiff_backup/log.pyc
 lib/python2.2/site-packages/rdiff_backup/manage.py
 lib/python2.2/site-packages/rdiff_backup/manage.pyc
+lib/python2.2/site-packages/rdiff_backup/metadata.py
+lib/python2.2/site-packages/rdiff_backup/metadata.pyc
+lib/python2.2/site-packages/rdiff_backup/regress.py
+lib/python2.2/site-packages/rdiff_backup/regress.pyc
 lib/python2.2/site-packages/rdiff_backup/restore.py
 lib/python2.2/site-packages/rdiff_backup/restore.pyc
-lib/python2.2/site-packages/rdiff_backup/rlist.py
-lib/python2.2/site-packages/rdiff_backup/rlist.pyc
 lib/python2.2/site-packages/rdiff_backup/robust.py
 lib/python2.2/site-packages/rdiff_backup/robust.pyc
 lib/python2.2/site-packages/rdiff_backup/rorpiter.py
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/rdiff-backup/distinfo,v
retrieving revision 1.2
diff -u -u -r1.2 distinfo
--- distinfo	2003/03/22 01:03:09	1.2
+++ distinfo	2003/07/09 14:31:52
@@ -1,6 +1,5 @@
 $NetBSD: distinfo,v 1.2 2003/03/22 01:03:09 wiz Exp $
 
-SHA1 (rdiff-backup-0.10.2.tar.gz) = 57725aa566648206323b2b597e2d2d29c7336b7c
-Size (rdiff-backup-0.10.2.tar.gz) = 110249 bytes
-SHA1 (patch-aa) = 26027114889f6dcbbca47d40227980b45a3d65ba
-SHA1 (patch-ab) = 123ad5cf21770ce882738b625eee3df457b55bf7
+SHA1 (rdiff-backup-0.12.0.tar.gz) = 0ffffae7b5dbb961c83a53c41de7a612fc14e4f0
+Size (rdiff-backup-0.12.0.tar.gz) = 115770 bytes
+SHA1 (patch-ab) = 00d14a7ac919cbf700f0b521e0a79e7625fd2363
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/rdiff-backup/patches/patch-ab,v
retrieving revision 1.2
diff -u -u -r1.2 patch-ab
--- patches/patch-ab	2003/03/22 01:03:09	1.2
+++ patches/patch-ab	2003/07/09 14:31:52
@@ -1,18 +1,13 @@
 $NetBSD: patch-ab,v 1.2 2003/03/22 01:03:09 wiz Exp $
 
---- setup.py.orig	Mon Jan 27 06:04:22 2003
-+++ setup.py
-@@ -19,9 +19,12 @@ setup(name="rdiff-backup",
- 	  ext_modules = [Extension("rdiff_backup.C", ["cmodule.c"]),
- 					 Extension("rdiff_backup._librsync",
- 							   ["_librsyncmodule.c"],
-+							   include_dirs=['%%LOCALBASE%%/include'],
-+							   library_dirs=['%%LOCALBASE%%/lib'],
-+							   runtime_library_dirs=['%%LOCALBASE%%/lib'],
- 							   libraries=["rsync"])],
+--- setup.py.orig	2003-06-26 03:27:30.000000000 -0400
++++ setup.py	2003-07-09 10:17:48.000000000 -0400
+@@ -56,7 +56,7 @@
+ 							   libraries=libname,
+ 							   extra_link_args=lflags_arg)],
  	  scripts = ['rdiff-backup'],
 -	  data_files = [('share/man/man1', ['rdiff-backup.1']),
 +	  data_files = [('man/man1', ['rdiff-backup.1']),
- 					('share/doc/rdiff-backup-%s' % version_string,
+ 					('share/doc/rdiff-backup-%s' % (version_string,),
  					 ['CHANGELOG', 'COPYING', 'README', 'FAQ.html'])])
  
>Release-Note:
>Audit-Trail:
>Unformatted: