diff -u rdiff-backup-1.2.7/debian/changelog rdiff-backup-1.2.7/debian/changelog --- rdiff-backup-1.2.7/debian/changelog +++ rdiff-backup-1.2.7/debian/changelog @@ -1,3 +1,10 @@ +rdiff-backup (1.2.7-1ubuntu2) jaunty; urgency=low + + * Makes --restrict and --test-server work together again (LP #349072) + * Adds dpatch, to handle 01_fix_restricted_test-server_option.dpatch + + -- Andreas Olsson Wed, 01 Apr 2009 23:51:12 +0200 + rdiff-backup (1.2.7-1ubuntu1) jaunty; urgency=low * Add --install-layout=deb to place files in /usr (LP: #345086) 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 XSBC-Original-Maintainer: Daniel Baumann -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 +## +## 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