diff -Nru rdiff-backup-1.2.8/debian/changelog rdiff-backup-1.2.8/debian/changelog --- rdiff-backup-1.2.8/debian/changelog 2012-01-17 02:01:02.000000000 +0000 +++ rdiff-backup-1.2.8/debian/changelog 2012-01-04 19:51:53.000000000 +0000 @@ -1,3 +1,20 @@ +rdiff-backup (1.2.8-7) unstable; urgency=low + + * debian/control + - bump Standards-Version to 3.9.2 + - add X-Python-Version field + - remove dpatch build-dependency + * debian/source/format + - switch to 3.0 (quilt) + * debian/patches + - migrated *.dpatch to quilt format + - add 02_python_2.6_deprecationwarning.diff patch (Closes:#587370) + - add 03_fix_hardlinks.diff (Closes:#558035) + * debian/rules + - switch to dh --with python2 + + -- Carl Chenet Wed, 04 Jan 2012 02:23:04 +0100 + rdiff-backup (1.2.8-6) unstable; urgency=low * debian/control diff -Nru rdiff-backup-1.2.8/debian/control rdiff-backup-1.2.8/debian/control --- rdiff-backup-1.2.8/debian/control 2012-01-17 02:01:02.000000000 +0000 +++ rdiff-backup-1.2.8/debian/control 2012-01-04 19:51:53.000000000 +0000 @@ -1,12 +1,13 @@ Source: rdiff-backup Section: utils Priority: optional +X-Python-Version: >= 2.5 Maintainer: Python Applications Packaging Team Uploaders: Carl Chenet Build-Depends: - debhelper (>= 7.3.5~), python-support, python-all-dev, python-pylibacl, python-pyxattr, - librsync-dev, dpatch -Standards-Version: 3.8.3 + debhelper (>= 7.3.5~), python-all-dev, python-pylibacl, python-pyxattr, + librsync-dev +Standards-Version: 3.9.2 Homepage: http://rdiff-backup.nongnu.org/ Vcs-Svn: svn://svn.debian.org/python-apps/packages/rdiff-backup/trunk/ Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/rdiff-backup/trunk/ diff -Nru rdiff-backup-1.2.8/debian/patches/00list rdiff-backup-1.2.8/debian/patches/00list --- rdiff-backup-1.2.8/debian/patches/00list 2012-01-17 02:01:02.000000000 +0000 +++ rdiff-backup-1.2.8/debian/patches/00list 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -01_fix_restricted_test-server_option.dpatch diff -Nru rdiff-backup-1.2.8/debian/patches/01_fix_restricted_test-server_option.diff rdiff-backup-1.2.8/debian/patches/01_fix_restricted_test-server_option.diff --- rdiff-backup-1.2.8/debian/patches/01_fix_restricted_test-server_option.diff 1970-01-01 00:00:00.000000000 +0000 +++ rdiff-backup-1.2.8/debian/patches/01_fix_restricted_test-server_option.diff 2012-01-04 19:51:53.000000000 +0000 @@ -0,0 +1,48 @@ +# Description: 01_fix_restricted_test-server_option.diff +# Author: Carl Chenet + +diff -urNad rdiff-backup-1.2.8~/rdiff_backup/Main.py rdiff-backup-1.2.8/rdiff_backup/Main.py +--- rdiff-backup-1.2.8~/rdiff_backup/Main.py 2009-03-16 15:36:21.000000000 +0100 ++++ rdiff-backup-1.2.8/rdiff_backup/Main.py 2010-02-20 11:26:27.000000000 +0100 +@@ -288,7 +288,7 @@ + elif action == "remove-older-than": RemoveOlderThan(rps[0]) + elif action == "restore": Restore(*rps) + elif action == "restore-as-of": Restore(rps[0], rps[1], 1) +- elif action == "test-server": SetConnections.TestConnections() ++ elif action == "test-server": SetConnections.TestConnections(rps) + elif action == "verify": Verify(rps[0]) + else: raise AssertionError("Unknown action " + action) + +diff -urNad rdiff-backup-1.2.8~/rdiff_backup/SetConnections.py rdiff-backup-1.2.8/rdiff_backup/SetConnections.py +--- rdiff-backup-1.2.8~/rdiff_backup/SetConnections.py 2009-03-16 15:36:21.000000000 +0100 ++++ rdiff-backup-1.2.8/rdiff_backup/SetConnections.py 2010-02-20 11:29:43.000000000 +0100 +@@ -241,20 +241,25 @@ + Globals.backup_reader = Globals.isbackup_reader = \ + Globals.backup_writer = Globals.isbackup_writer = None + +-def TestConnections(): ++def TestConnections(rpaths): + """Test connections, printing results""" + if len(Globals.connections) == 1: print "No remote connections specified" + else: +- for i in range(1, len(Globals.connections)): test_connection(i) ++ assert len(Globals.connections) == len(rpaths) + 1 ++ for i in range(1, len(Globals.connections)): ++ test_connection(i, rpaths[i-1]) + +-def test_connection(conn_number): ++def test_connection(conn_number, rp): + """Test connection. conn_number 0 is the local connection""" + print "Testing server started by: ", __conn_remote_cmds[conn_number] + conn = Globals.connections[conn_number] + try: + assert conn.Globals.get('current_time') is None +- assert type(conn.os.listdir('.')) is list + version = conn.Globals.get('version') ++ try: ++ assert type(conn.os.getuid()) is int ++ except AttributeError: # Windows doesn't support os.getuid() ++ assert type(conn.os.listdir(rp.path)) is list + except: + sys.stderr.write("Server tests failed\n") + raise diff -Nru rdiff-backup-1.2.8/debian/patches/01_fix_restricted_test-server_option.dpatch rdiff-backup-1.2.8/debian/patches/01_fix_restricted_test-server_option.dpatch --- rdiff-backup-1.2.8/debian/patches/01_fix_restricted_test-server_option.dpatch 2012-01-17 02:01:02.000000000 +0000 +++ rdiff-backup-1.2.8/debian/patches/01_fix_restricted_test-server_option.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 01_fix_restricted_test-server_option.dpatch by Carl Chenet -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Reimplemented from the Ubuntu patch by -## DP: Original patch from : https://bugs.launchpad.net/ubuntu/+source/rdiff-backup/+bug/349072 - -@DPATCH@ -diff -urNad rdiff-backup-1.2.8~/rdiff_backup/Main.py rdiff-backup-1.2.8/rdiff_backup/Main.py ---- rdiff-backup-1.2.8~/rdiff_backup/Main.py 2009-03-16 15:36:21.000000000 +0100 -+++ rdiff-backup-1.2.8/rdiff_backup/Main.py 2010-02-20 11:26:27.000000000 +0100 -@@ -288,7 +288,7 @@ - elif action == "remove-older-than": RemoveOlderThan(rps[0]) - elif action == "restore": Restore(*rps) - elif action == "restore-as-of": Restore(rps[0], rps[1], 1) -- elif action == "test-server": SetConnections.TestConnections() -+ elif action == "test-server": SetConnections.TestConnections(rps) - elif action == "verify": Verify(rps[0]) - else: raise AssertionError("Unknown action " + action) - -diff -urNad rdiff-backup-1.2.8~/rdiff_backup/SetConnections.py rdiff-backup-1.2.8/rdiff_backup/SetConnections.py ---- rdiff-backup-1.2.8~/rdiff_backup/SetConnections.py 2009-03-16 15:36:21.000000000 +0100 -+++ rdiff-backup-1.2.8/rdiff_backup/SetConnections.py 2010-02-20 11:29:43.000000000 +0100 -@@ -241,20 +241,25 @@ - Globals.backup_reader = Globals.isbackup_reader = \ - Globals.backup_writer = Globals.isbackup_writer = None - --def TestConnections(): -+def TestConnections(rpaths): - """Test connections, printing results""" - if len(Globals.connections) == 1: print "No remote connections specified" - else: -- for i in range(1, len(Globals.connections)): test_connection(i) -+ assert len(Globals.connections) == len(rpaths) + 1 -+ for i in range(1, len(Globals.connections)): -+ test_connection(i, rpaths[i-1]) - --def test_connection(conn_number): -+def test_connection(conn_number, rp): - """Test connection. conn_number 0 is the local connection""" - print "Testing server started by: ", __conn_remote_cmds[conn_number] - conn = Globals.connections[conn_number] - try: - assert conn.Globals.get('current_time') is None -- assert type(conn.os.listdir('.')) is list - version = conn.Globals.get('version') -+ try: -+ assert type(conn.os.getuid()) is int -+ except AttributeError: # Windows doesn't support os.getuid() -+ assert type(conn.os.listdir(rp.path)) is list - except: - sys.stderr.write("Server tests failed\n") - raise diff -Nru rdiff-backup-1.2.8/debian/patches/02_python_2.6_deprecationwarning.diff rdiff-backup-1.2.8/debian/patches/02_python_2.6_deprecationwarning.diff --- rdiff-backup-1.2.8/debian/patches/02_python_2.6_deprecationwarning.diff 1970-01-01 00:00:00.000000000 +0000 +++ rdiff-backup-1.2.8/debian/patches/02_python_2.6_deprecationwarning.diff 2012-01-04 19:51:53.000000000 +0000 @@ -0,0 +1,25 @@ +# Description: 02_python_2.6_deprecationwarning.diff +# Author: by converted to Quilt by Carl Chenet +# from the nmu suggestion by Carlos Alberto Lopez Perez +# patch adapted from the one at https://savannah.nongnu.org/bugs/?26064 +# This fix the following warning: "DeprecationWarning: os.popen2 is +# deprecated. Use the subprocess module." +# Also, the *nix version of rdiff-backup requires shell=True instead of +# shell=False in the subprocess.Popen call + +diff -urNad rdiff-backup-1.2.8~/rdiff_backup/SetConnections.py rdiff-backup-1.2.8/rdiff_backup/SetConnections.py +--- rdiff-backup-1.2.8~/rdiff_backup/SetConnections.py 2009-03-16 15:36:21.000000000 +0100 ++++ rdiff-backup-1.2.8/rdiff_backup/SetConnections.py 2009-10-03 19:27:54.935647306 +0200 +@@ -135,10 +135,10 @@ + if not remote_cmd: return Globals.local_connection + + Log("Executing " + remote_cmd, 4) +- if os.name == "nt": ++ if map(int, sys.version.split()[0].split('.')[:2]) >= [2, 6]: + import subprocess + try: +- process = subprocess.Popen(remote_cmd, shell=False, bufsize=0, ++ process = subprocess.Popen(remote_cmd, shell=True, bufsize=0, + stdin=subprocess.PIPE, + stdout=subprocess.PIPE) + (stdin, stdout) = (process.stdin, process.stdout) diff -Nru rdiff-backup-1.2.8/debian/patches/03_fix_hardlinks.diff rdiff-backup-1.2.8/debian/patches/03_fix_hardlinks.diff --- rdiff-backup-1.2.8/debian/patches/03_fix_hardlinks.diff 1970-01-01 00:00:00.000000000 +0000 +++ rdiff-backup-1.2.8/debian/patches/03_fix_hardlinks.diff 2012-01-04 19:51:53.000000000 +0000 @@ -0,0 +1,96 @@ +# Description: fix_hardlinks.diff +# Author: by converted to Quilt format by Carl Chenet +# from the nmu suggestion by Carlos Alberto Lopez Perez +# Apply hard-links bug fix patch +# https://savannah.nongnu.org/bugs/index.php?26848 + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' rdiff-backup-1.2.8~/rdiff_backup/Hardlink.py rdiff-backup-1.2.8/rdiff_backup/Hardlink.py +--- rdiff-backup-1.2.8~/rdiff_backup/Hardlink.py 2009-03-16 14:36:21.000000000 +0000 ++++ rdiff-backup-1.2.8/rdiff_backup/Hardlink.py 2012-01-03 11:44:21.708987145 +0000 +@@ -95,7 +95,13 @@ + src_rorp.getnumlinks() == dest_rorp.getnumlinks() == 1): + return 1 # Hard links don't apply + +- if src_rorp.getnumlinks() < dest_rorp.getnumlinks(): return 0 ++ """The sha1 of linked files is only stored in the metadata of the first ++ linked file on the dest side. If the first linked file on the src side is ++ deleted, then the sha1 will also be deleted on the dest side, so we test for this ++ & report not equal so that another sha1 will be stored with the next linked ++ file on the dest side""" ++ if (not islinked(src_rorp) and not dest_rorp.has_sha1()): return 0 ++ if src_rorp.getnumlinks() != dest_rorp.getnumlinks(): return 0 + src_key = get_inode_key(src_rorp) + index, remaining, dest_key, digest = _inode_index[src_key] + if dest_key == "NA": +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' rdiff-backup-1.2.8~/rdiff_backup/compare.py rdiff-backup-1.2.8/rdiff_backup/compare.py +--- rdiff-backup-1.2.8~/rdiff_backup/compare.py 2009-03-16 14:36:21.000000000 +0000 ++++ rdiff-backup-1.2.8/rdiff_backup/compare.py 2012-01-03 11:43:33.792989189 +0000 +@@ -25,7 +25,7 @@ + """ + + from __future__ import generators +-import Globals, restore, rorpiter, log, backup, static, rpath, hash, robust ++import Globals, restore, rorpiter, log, backup, static, rpath, hash, robust, Hardlink + + def Compare(src_rp, mirror_rp, inc_rp, compare_time): + """Compares metadata in src_rp dir with metadata in mirror_rp at time""" +@@ -80,14 +80,15 @@ + bad_files = 0 + for repo_rorp in repo_iter: + if not repo_rorp.isreg(): continue +- if not repo_rorp.has_sha1(): ++ verify_sha1 = get_hash(repo_rorp) ++ if not verify_sha1: + log.Log("Warning: Cannot find SHA1 digest for file %s,\n" + "perhaps because this feature was added in v1.1.1" + % (repo_rorp.get_indexpath(),), 2) + continue + fp = RepoSide.rf_cache.get_fp(base_index + repo_rorp.index, repo_rorp) + computed_hash = hash.compute_sha1_fp(fp) +- if computed_hash == repo_rorp.get_sha1(): ++ if computed_hash == verify_sha1: + log.Log("Verified SHA1 digest of " + repo_rorp.get_indexpath(), 5) + else: + bad_files += 1 +@@ -95,11 +96,24 @@ + "doesn't match recorded digest of\n %s\n" + "Your backup repository may be corrupted!" % + (repo_rorp.get_indexpath(), computed_hash, +- repo_rorp.get_sha1()), 2) ++ verify_sha1), 2) + RepoSide.close_rf_cache() + if not bad_files: log.Log("Every file verified successfully.", 3) + return bad_files + ++def get_hash (repo_rorp): ++ """ Try to get a sha1 digest from the repository. If hardlinks ++ are saved in the metadata, get the sha1 from the first hardlink """ ++ Hardlink.add_rorp(repo_rorp) ++ if Hardlink.islinked(repo_rorp): ++ verify_sha1 = Hardlink.get_sha1(repo_rorp) ++ elif repo_rorp.has_sha1(): ++ verify_sha1 = repo_rorp.get_sha1() ++ else: ++ verify_sha1 = None ++ Hardlink.del_rorp(repo_rorp) ++ return verify_sha1 ++ + def print_reports(report_iter): + """Given an iter of CompareReport objects, print them to screen""" + assert not Globals.server +@@ -199,12 +213,13 @@ + """Like above, but also compare sha1 sums of any regular files""" + def hashes_changed(src_rp, mir_rorp): + """Return 0 if their data hashes same, 1 otherwise""" +- if not mir_rorp.has_sha1(): ++ verify_sha1 = get_hash(mir_rorp) ++ if not verify_sha1: + log.Log("Warning: Metadata file has no digest for %s, " + "unable to compare." % (mir_rorp.get_indexpath(),), 2) + return 0 + elif (src_rp.getsize() == mir_rorp.getsize() and +- hash.compute_sha1(src_rp) == mir_rorp.get_sha1()): ++ hash.compute_sha1(src_rp) == verify_sha1): + return 0 + return 1 + diff -Nru rdiff-backup-1.2.8/debian/patches/series rdiff-backup-1.2.8/debian/patches/series --- rdiff-backup-1.2.8/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ rdiff-backup-1.2.8/debian/patches/series 2012-01-04 19:51:53.000000000 +0000 @@ -0,0 +1,3 @@ +01_fix_restricted_test-server_option.diff +02_python_2.6_deprecationwarning.diff +03_fix_hardlinks.diff diff -Nru rdiff-backup-1.2.8/debian/rules rdiff-backup-1.2.8/debian/rules --- rdiff-backup-1.2.8/debian/rules 2012-01-17 02:01:02.000000000 +0000 +++ rdiff-backup-1.2.8/debian/rules 2012-01-04 19:51:53.000000000 +0000 @@ -1,15 +1,7 @@ #!/usr/bin/make -f -include /usr/share/dpatch/dpatch.make - -build: patch-stamp - dh build - -clean: unpatch - dh clean - %: - dh $@ + dh $@ --with python2 override_dh_install: install -D -m 0644 debian/local/bash-completion debian/rdiff-backup/etc/bash_completion.d/rdiff-backup diff -Nru rdiff-backup-1.2.8/debian/source/format rdiff-backup-1.2.8/debian/source/format --- rdiff-backup-1.2.8/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ rdiff-backup-1.2.8/debian/source/format 2012-01-17 02:01:02.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt)