Hello community,
here is the log from the commit of package rdiff-backup
checked in at Tue Jan 9 00:58:12 CET 2007.
--------
--- rdiff-backup/rdiff-backup.changes 2006-10-02 14:01:06.000000000 +0200
+++ /mounts/work_src_done/STABLE/rdiff-backup/rdiff-backup.changes 2007-01-09 00:08:43.748398000 +0100
@@ -1,0 +2,9 @@
+Tue Jan 9 00:07:56 CET 2007 - cthiel@suse.de
+
+- update to version 1.0.5
+ * Fix a traceback due to an off-by-1 error in "--remove-older-than nB".
+ * Fix a security violation when restoring from a remote repository.
+ * --list-at-time, --list-increments, and --list-increment-sizes should now
+ work from a read-only repository.
+
+-------------------------------------------------------------------
Old:
----
rdiff-backup-1.0.4.tar.bz2
New:
----
rdiff-backup-1.0.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rdiff-backup.spec ++++++
--- /var/tmp/diff_new_pack.DW5255/_old 2007-01-09 00:58:07.000000000 +0100
+++ /var/tmp/diff_new_pack.DW5255/_new 2007-01-09 00:58:07.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package rdiff-backup (Version 1.0.4)
+# spec file for package rdiff-backup (Version 1.0.5)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -13,9 +13,9 @@
Name: rdiff-backup
BuildRequires: librsync python-devel
Summary: Convenient and transparent local/remote incremental mirror/backup
-Version: 1.0.4
-Release: 21
-License: GPL
+Version: 1.0.5
+Release: 1
+License: GNU General Public License (GPL)
URL: http://www.nongnu.org/rdiff-backup/
Source0: http://savannah.nongnu.org/download/rdiff-backup/%{name}-%{version}.tar.bz2
Patch0: %{name}-setup.py.diff
@@ -69,6 +69,12 @@
%endif
%changelog -n rdiff-backup
+* Tue Jan 09 2007 - cthiel@suse.de
+- update to version 1.0.5
+ * Fix a traceback due to an off-by-1 error in "--remove-older-than nB".
+ * Fix a security violation when restoring from a remote repository.
+ * --list-at-time, --list-increments, and --list-increment-sizes should now
+ work from a read-only repository.
* Mon Oct 02 2006 - cthiel@suse.de
- fix build on older distributions
* Thu Sep 21 2006 - cthiel@suse.de
++++++ rdiff-backup-1.0.4.tar.bz2 -> rdiff-backup-1.0.5.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rdiff-backup-1.0.4/CHANGELOG new/rdiff-backup-1.0.5/CHANGELOG
--- old/rdiff-backup-1.0.4/CHANGELOG 2006-01-16 05:09:58.000000000 +0100
+++ new/rdiff-backup-1.0.5/CHANGELOG 2006-11-12 08:32:01.000000000 +0100
@@ -1,3 +1,16 @@
+New in v1.0.5 (2006/11/11)
+--------------------------
+
+Fix a traceback due to an off-by-1 error in "--remove-older-than nB".
+
+Fix a security violation when restoring from a remote repository.
+(Patch from Charles Duffy.)
+
+--list-at-time, --list-increments, and --list-increment-sizes should
+now work from a read-only repository. (Bug reported by Wolfgang
+Dautermann.)
+
+
New in v1.0.4 (2006/01/15)
--------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rdiff-backup-1.0.4/rdiff_backup/fs_abilities.py new/rdiff-backup-1.0.5/rdiff_backup/fs_abilities.py
--- old/rdiff-backup-1.0.4/rdiff_backup/fs_abilities.py 2006-01-16 05:09:58.000000000 +0100
+++ new/rdiff-backup-1.0.5/rdiff_backup/fs_abilities.py 2006-11-12 08:32:01.000000000 +0100
@@ -100,14 +100,14 @@
s.append(s[0])
return '\n'.join(s)
- def init_readonly(self, rp):
+ def init_readonly(self, rp, override_chars_to_quote = None):
"""Set variables using fs tested at RPath rp. Run locally.
This method does not write to the file system at all, and
should be run on the file system when the file system will
only need to be read.
- Only self.acls and self.eas are set.
+ Only self.acls, self.eas, and self.chars_to_quote are set.
"""
assert rp.conn is Globals.local_connection
@@ -117,6 +117,13 @@
self.set_acls(rp)
self.set_resource_fork_readonly(rp)
self.set_carbonfile()
+
+ if override_chars_to_quote is None:
+ ctq_rp = rp.append('chars_to_quote')
+ if ctq_rp.isreg(): self.chars_to_quote = ctq_rp.get_data()
+ else: self.chars_to_quote = "" # default is no quoting
+ else: self.chars_to_quote = override_chars_to_quote
+
return self
def init_readwrite(self, rbdir, use_ctq_file = 1,
@@ -395,13 +402,13 @@
else: self.high_perms = 1
tmp_rp.delete()
-def get_fsabilities_readonly(desc_string, rp):
+def get_fsabilities_readonly(desc_string, rb, ctq = None):
"""Return an FSAbilities object with given description_string
Will be initialized read_only with given RPath rp.
"""
- return FSAbilities(desc_string).init_readonly(rp)
+ return FSAbilities(desc_string).init_readonly(rb, ctq)
def get_fsabilities_readwrite(desc_string, rb, use_ctq_file = 1, ctq = None):
"""Like above but initialize read/write and pass other arguments"""
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rdiff-backup-1.0.4/rdiff_backup/Globals.py new/rdiff-backup-1.0.5/rdiff_backup/Globals.py
--- old/rdiff-backup-1.0.4/rdiff_backup/Globals.py 2006-01-16 05:09:59.000000000 +0100
+++ new/rdiff-backup-1.0.5/rdiff_backup/Globals.py 2006-11-12 08:32:01.000000000 +0100
@@ -23,7 +23,7 @@
# The current version of rdiff-backup
-version = "1.0.4"
+version = "1.0.5"
# If this is set, use this value in seconds as the current time
# instead of reading it from the clock.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rdiff-backup-1.0.4/rdiff_backup/Main.py new/rdiff-backup-1.0.5/rdiff_backup/Main.py
--- old/rdiff-backup-1.0.4/rdiff_backup/Main.py 2006-01-16 05:09:58.000000000 +0100
+++ new/rdiff-backup-1.0.5/rdiff_backup/Main.py 2006-11-12 08:32:01.000000000 +0100
@@ -616,10 +616,16 @@
if result is None:
Log.FatalError("%s does not appear to be an rdiff-backup directory."
% (Globals.rbdir.path,))
- elif result == 1: Log.FatalError(
- "Previous backup to %s seems to have failed.\nRerun rdiff-backup "
- "with --check-destination-dir option to revert directory "
- "to state before unsuccessful session." % (mirror_root.path,))
+ elif result == 1: Log.FatalError("""
+The previous backup to %s is still in progress or has failed.
+You can rerun rdiff-backup with --check-destination-dir option to revert
+the directory to the state it was in before an unsuccessful session.
+However,
+*** -------------------------------------------------------------------- ***
+*** If an rdiff-backup process is currently running, ***
+*** DO NOT RUN --check-destination-dir OR OTHERWISE MODIFY THE DIRECTORY ***
+*** -------------------------------------------------------------------- ***
+""" % (mirror_root.path,))
def restore_set_root(rpin):
"""Set data dir, restore_root and index, or return None if fail
@@ -677,7 +683,7 @@
def ListIncrements(rp):
"""Print out a summary of the increments and their times"""
- rp = require_root_set(rp)
+ rp = require_root_set(rp, readonly = 1)
restore_check_backup_dir(restore_root)
mirror_rp = restore_root.new_index(restore_index)
inc_rpath = Globals.rbdir.append_path('increments', restore_index)
@@ -687,7 +693,7 @@
print manage.describe_incs_parsable(incs, mirror_time, mirror_rp)
else: print manage.describe_incs_human(incs, mirror_time, mirror_rp)
-def require_root_set(rp):
+def require_root_set(rp, readonly = None):
"""Make sure rp is or is in a valid rdiff-backup dest directory.
Also initializes fs_abilities and quoting and return quoted rp if
@@ -697,11 +703,11 @@
if not restore_set_root(rp):
Log.FatalError(("Bad directory %s.\n" % (rp.path,)) +
"It doesn't appear to be an rdiff-backup destination dir")
- single_set_fs_globals(Globals.rbdir)
+ single_set_fs_globals(Globals.rbdir, readonly)
if Globals.chars_to_quote: return restore_init_quoting(rp)
else: return rp
-def single_set_fs_globals(rbdir):
+def single_set_fs_globals(rbdir, readonly = None):
"""Use fs_abilities to set globals that depend on filesystem.
This is appropriate for listing increments, or any other operation
@@ -718,8 +724,10 @@
SetConnections.UpdateGlobal(write_attr, 1)
rbdir.conn.Globals.set_local(conn_attr, 1)
- fsa = rbdir.conn.fs_abilities.get_fsabilities_readwrite('archive',
- rbdir, 1, Globals.chars_to_quote)
+ if readonly: fsa = rbdir.conn.fs_abilities.get_fsabilities_readonly(
+ 'archive', rbdir, Globals.chars_to_quote)
+ else: fsa = rbdir.conn.fs_abilities.get_fsabilities_readwrite(
+ 'archive', rbdir, 1, Globals.chars_to_quote)
Log(str(fsa), 4)
update_triple(fsa.eas, ('eas_active', 'eas_write', 'eas_conn'))
@@ -800,7 +808,7 @@
def ListChangedSince(rp):
"""List all the files under rp that have changed since restoretime"""
- rp = require_root_set(rp)
+ rp = require_root_set(rp, readonly = 1)
try: rest_time = Time.genstrtotime(restore_timestr)
except Time.TimeException, exc: Log.FatalError(str(exc))
mirror_rp = restore_root.new_index(restore_index)
@@ -812,7 +820,7 @@
def ListAtTime(rp):
"""List files in archive under rp that are present at restoretime"""
- rp = require_root_set(rp)
+ rp = require_root_set(rp, readonly = 1)
try: rest_time = Time.genstrtotime(restore_timestr)
except Time.TimeException, exc: Log.FatalError(str(exc))
mirror_rp = restore_root.new_index(restore_index)
@@ -856,7 +864,7 @@
Log.FatalError("No destination dir found at %s" % (dest_rp.path,))
elif need_check == 0:
Log.FatalError("Destination dir %s does not need checking" %
- (dest_rp.path,))
+ (dest_rp.path,), errlevel = 0)
init_user_group_mapping(dest_rp.conn)
dest_rp.conn.regress.Regress(dest_rp)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rdiff-backup-1.0.4/rdiff_backup/Security.py new/rdiff-backup-1.0.5/rdiff_backup/Security.py
--- old/rdiff-backup-1.0.4/rdiff_backup/Security.py 2006-01-16 05:09:59.000000000 +0100
+++ new/rdiff-backup-1.0.5/rdiff_backup/Security.py 2006-11-12 08:32:01.000000000 +0100
@@ -139,6 +139,7 @@
if sec_level == "read-only" or sec_level == "all":
l.extend(["fs_abilities.get_fsabilities_readonly",
"fs_abilities.get_fsabilities_restoresource",
+ "restore.MirrorStruct.get_increment_times",
"restore.MirrorStruct.set_mirror_and_rest_times",
"restore.MirrorStruct.set_mirror_select",
"restore.MirrorStruct.initialize_rf_cache",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rdiff-backup-1.0.4/rdiff_backup/Time.py new/rdiff-backup-1.0.5/rdiff_backup/Time.py
--- old/rdiff-backup-1.0.4/rdiff_backup/Time.py 2006-01-16 05:09:59.000000000 +0100
+++ new/rdiff-backup-1.0.5/rdiff_backup/Time.py 2006-11-12 08:32:01.000000000 +0100
@@ -187,7 +187,7 @@
session_times = Globals.rbdir.conn.restore.MirrorStruct \
.get_increment_times()
session_times.sort()
- if len(session_times) < session_num:
+ if len(session_times) <= session_num:
return session_times[0] # Use oldest if two few backups
return session_times[-session_num-1]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/rdiff-backup-1.0.4/rdiff-backup new/rdiff-backup-1.0.5/rdiff-backup
--- old/rdiff-backup-1.0.4/rdiff-backup 2006-01-16 05:09:59.000000000 +0100
+++ new/rdiff-backup-1.0.5/rdiff-backup 2006-11-12 08:32:01.000000000 +0100
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# rdiff-backup -- Mirror files while keeping incremental changes
-# Version 1.0.4 released January 15, 2006
+# Version 1.0.5 released November 11, 2006
# Copyright (C) 2001-2005 Ben Escoto