Package: rdiff-backup Version: 1.2.7-1 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu jaunty ubuntu-patch
As of rdiff-backup 1.2.6 --test-server always fails if --restrict is in use on the recieving side. See https://bugs.launchpad.net/ubuntu/+source/rdiff-backup/+bug/349072 for more information. This can be solved by backporting a patch provided by upstream. *** /tmp/tmpTsrfhx In Ubuntu, we've applied the attached patch to achieve the following: * Makes --restrict and --test-server work together again (LP #349072) * Adds dpatch, to handle 01_fix_restricted_test-server_option.dpatch We thought you might be interested in doing the same. -- System Information: Debian Release: 5.0 APT prefers jaunty-updates APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 'jaunty') Architecture: amd64 (x86_64) Kernel: Linux 2.6.28-11-server (SMP w/1 CPU core) Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -u rdiff-backup-1.2.7/debian/changelog rdiff-backup-1.2.7/debian/changelog diff -u rdiff-backup-1.2.7/debian/control rdiff-backup-1.2.7/debian/control --- rdiff-backup-1.2.7/debian/control +++ rdiff-backup-1.2.7/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu MOTU Developers <ubuntu-m...@lists.ubuntu.com> XSBC-Original-Maintainer: Daniel Baumann <dan...@debian.org> -Build-Depends: debhelper (>= 7), python-support, python-dev, python-pylibacl, python-pyxattr, librsync-dev (>= 0.9.7-4) +Build-Depends: debhelper (>= 7), python-support, python-dev, python-pylibacl, python-pyxattr, librsync-dev (>= 0.9.7-4), dpatch Standards-Version: 3.8.0 Homepage: http://rdiff-backup.nongnu.org/ Vcs-Browser: http://git.debian.net/?p=debian/rdiff-backup.git diff -u rdiff-backup-1.2.7/debian/rules rdiff-backup-1.2.7/debian/rules --- rdiff-backup-1.2.7/debian/rules +++ rdiff-backup-1.2.7/debian/rules @@ -1,6 +1,8 @@ #!/usr/bin/make -f -clean: +clean: cleano unpatch + +cleano: dh_testdir dh_testroot rm -f build-stamp @@ -11,7 +13,7 @@ dh_clean build: build-stamp -build-stamp: +build-stamp: patch dh_testdir python setup.py build @@ -29,6 +31,19 @@ install -D -m 0644 debian/config/bash-completion debian/rdiff-backup/etc/bash_completion.d/rdiff-backup + +patch: patch-stamp + +patch-stamp: + dpatch apply-all + dpatch cat-all >patch-stamp + touch patch-stamp + +unpatch: + dpatch deapply-all + rm -rf patch-stamp debian/patched + + binary: binary-arch binary-arch: build install @@ -52 +67 @@ -.PHONY: clean build install binary binary-arch binary-indep +.PHONY: clean build install binary binary-arch binary-indep patch unpatch cleano only in patch2: unchanged: --- rdiff-backup-1.2.7.orig/debian/patches/01_fix_restricted_test-server_option.dpatch +++ rdiff-backup-1.2.7/debian/patches/01_fix_restricted_test-server_option.dpatch @@ -0,0 +1,53 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_fix_restricted_test-server_option.dpatch by <andr...@arrakis.se> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Makes --test-server and --restrict work together again. +## DP: Taken from http://lists.nongnu.org/archive/html/rdiff-backup-commits/2009-03/msg00023.html +## DP: and from https://bugs.launchpad.net/ubuntu/+source/rdiff-backup/+bug/349072/comments/17 + +...@dpatch@ +diff -urNad rdiff-backup-1.2.7~/rdiff_backup/Main.py rdiff-backup-1.2.7/rdiff_backup/Main.py +--- rdiff-backup-1.2.7~/rdiff_backup/Main.py 2009-03-03 03:29:55.000000000 +0100 ++++ rdiff-backup-1.2.7/rdiff_backup/Main.py 2009-04-01 23:45:34.000000000 +0200 +@@ -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.7~/rdiff_backup/SetConnections.py rdiff-backup-1.2.7/rdiff_backup/SetConnections.py +--- rdiff-backup-1.2.7~/rdiff_backup/SetConnections.py 2009-03-03 03:29:55.000000000 +0100 ++++ rdiff-backup-1.2.7/rdiff_backup/SetConnections.py 2009-04-01 23:45:40.000000000 +0200 +@@ -241,19 +241,24 @@ + 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 ++ 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 + version = conn.Globals.get('version') + except: + sys.stderr.write("Server tests failed\n") only in patch2: unchanged: --- rdiff-backup-1.2.7.orig/debian/patches/00list +++ rdiff-backup-1.2.7/debian/patches/00list @@ -0,0 +1 @@ +01_fix_restricted_test-server_option.dpatch