debiandir

parent 3fe91e46
This package uses dpatch to manage all modifications to the upstream
source. Changes are stored in the source package as diffs in
debian/patches and applied during the build.
To get the fully patched source after unpacking the source package, cd
to the root level of the source package and run:
debian/rules patch
Removing a patch is as simple as removing its entry from the
debian/patches/00list file, and please also remove the patch file
itself.
Creating a new patch is done with "dpatch-edit-patch patch XX_patchname"
where you should replace XX with a new number and patchname with a
descriptive shortname of the patch. You can then simply edit all the
files your patch wants to edit, and then simply "exit 0" from the shell
to actually create the patch file.
To tweak an already existing patch, call "dpatch-edit-patch XX_patchname"
and replace XX_patchname with the actual filename from debian/patches
you want to use.
To clean up afterwards again, "debian/rules unpatch" will do the
work for you - or you can of course choose to call
"fakeroot debian/rules clean" all together.
---
this documentation is part of dpatch package, and may be used by
packages using dpatch to comply with policy on README.source. This
documentation is meant to be useful to users who are not proficient in
dpatch in doing work with dpatch-based packages. Please send any
improvements to the BTS of dpatch package.
original text by Gerfried Fuchs, edited by Junichi Uekawa <dancer@debian.org>
10 Aug 2008.
This diff is collapsed.
Source: rdiff-backup
Section: utils
Priority: optional
X-Python-Version: >= 2.5
Maintainer: Python Applications Packaging Team <python-apps-team@lists.alioth.debian.org>
Uploaders: Carl Chenet <chaica@ohmytux.com>
Build-Depends:
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/
Package: rdiff-backup
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}
Recommends: python-pylibacl, python-pyxattr
Description: remote incremental backup
rdiff-backup backs up one directory to another, possibly over a network. The
target directory ends up a copy of the source directory, but extra reverse
diffs are stored in a special subdirectory of that target directory, so you can
still recover files lost some time ago. The idea is to combine the best
features of a mirror and an incremental backup. rdiff-backup also preserves
subdirectories, hard links, dev files, permissions, uid/gid ownership,
modification times, extended attributes, acls, and resource forks.
.
Also, rdiff-backup can operate in a bandwidth efficient manner over a pipe,
like rsync. Thus you can use rdiff-backup and ssh to securely back a hard drive
up to a remote location, and only the differences will be transmitted. Finally,
rdiff-backup is easy to use and settings have sensible defaults.
Author: Ben Escoto <ben@emerose.org>
Download: http://rdiff-backup.nongnu.org/
Files: *
Copyright: (C) 2001-2008 Ben Escoto <bescoto@stanford.edu>
License: GPL-2+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-2 file.
Files: debian/*
Copyright: (C) 2005-2009 Daniel Baumann <daniel@debian.org>
License: GPL-2+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-2 file.
# /etc/bash_completion.d/rdiff-backup - bash-completion for rdiff-backup
# 2008 Andreas Olsson <andreas@arrakis.se>
#
# Developed for 1.2.x but can be "ported" to older version by modifying the
# lists of available options.
#
# Besides supplying options it will also try to determine
# when it is suitible to complete what.
#
# Feel free to send comments or suggestions.
shopt -s extglob
_rdiff_backup ()
{
local cur prev wfilearg wpatharg wnumarg wotherarg longopts shortopts options
COMPREPLAY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
# These options will be completed by the path to a filename.
wfilearg="--exclude-filelist|--exclude-globbing-filelist|--exclude-if-present|
|--group-mapping-file|--include-filelist|--include-globbing-filelist|
|--user-mapping-file"
# These options will be completed by the path to a directory.
wpatharg="--remote-tempdir|--restrict|--restrict-read-only|
|--restrict-update-only|--tempdir"
# These options will be completed by a number, from 0 to 9.
wnumarg="--terminal-verbosity|--verbosity|-v"
# These options requires a non-completable argument.
# They won't be completed at all.
wotherarg="--compare-at-time|--compare-full-at-time|--compare-hash-at-time|
|--current-time|--exclude|--exclude-regexp|--include|--include-regexp|
|--list-at-time|--list-changed-since|--max-file-size|--min-file-size|
|--no-compression-regexp|-r|--restore-as-of|--remote-schema|
|--remove-older-than|--verify-at-time"
# Availible long options
longopts="--backup-mode --calculate-average --carbonfile --check-destination-dir \
--compare --compare-at-time --compare-full --compare-full-at-time \
--compare-hash --compare-hash-at-time --create-full-path --current-time \
--exclude --exclude-device-files --exclude-fifos --exclude-filelist \
--exclude-filelist-stdin --exclude-globbing-filelist --exclude-globbing-filelist-stdin \
--exclude-other-filesystems --exclude-regexp --exclude-special-files --exclude-sockets \
--exclude-symbolic-links --exclude-if-present --force --group-mapping-file --include \
--include-filelist --include-filelist-stdin --include-globbing-filelist \
--include-globbing-filelist-stdin --include-regexp --include-special-files \
--include-symbolic-links --list-at-time --list-changed-since --list-increments \
--list-increment-sizes --max-file-size --min-file-size --never-drop-acls --no-acls \
--no-carbonfile --no-compare-inode --no-compression --no-compression-regexp --no-eas \
--no-file-statistics --no-hard-links --null-separator --parsable-output \
--override-chars-to-quote --preserve-numerical-ids --print-statistics --restore-as-of \
----remote-schema --remote-tempdir --remove-older-than --restrict \
--restrict-read-only --restrict-update-only --ssh-no-compression --tempdir \
--terminal-verbosity --test-server --user-mapping-file --verbosity --verify \
--verify-at-time --version"
# Availible short options
shortopts="-b -l -r -v -V"
options=${longopts}" "${shortopts}
case "$prev" in
@($wfilearg))
_filedir
return 0
;;
@($wpatharg))
_filedir -d
return 0
;;
@($wotherarg))
return 0
;;
@($wnumarg))
COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- $cur ) )
return 0
;;
esac
if [[ ${cur} == -* ]]
then
COMPREPLY=( $(compgen -W "${options}" -- ${cur}) )
return 0
else
_filedir
return 0
fi
}
complete -F _rdiff_backup -o filenames rdiff-backup
# Description: 01_fix_restricted_test-server_option.diff
# Author: Carl Chenet <chaica@ohmytux.com>
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
# Description: 02_python_2.6_deprecationwarning.diff
# Author: by <andreas@pc13267v15.midgard.liu.se> converted to Quilt by Carl Chenet <chaica@ohmytux.com>
# from the nmu suggestion by Carlos Alberto Lopez Perez <clopez@igalia.com>
# 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)
# Description: fix_hardlinks.diff
# Author: by <clopez@igalia.com> converted to Quilt format by Carl Chenet <chaica@ohmytux.com>
# from the nmu suggestion by Carlos Alberto Lopez Perez <clopez@igalia.com>
# 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
01_fix_restricted_test-server_option.diff
02_python_2.6_deprecationwarning.diff
03_fix_hardlinks.diff
rdiff-backup for Debian
-----------------------
Note: rdiff-backup *depends* on a filesystem capable of long-filenames on the
target-side. If you want to backup onto a Windows filesystems, you have to
mount them as vfat.
-- Daniel Baumann <daniel@debian.org> Mon, 28 Nov 2005 09:21:00 +0100
FAQ.html
README
examples.html
#!/usr/bin/make -f
%:
dh $@ --with python2
override_dh_install:
install -D -m 0644 debian/local/bash-completion debian/rdiff-backup/etc/bash_completion.d/rdiff-backup
# Removing useless files
rm -rf debian/rdiff-backup/usr/share/doc/rdiff-backup-*
version=3
http://savannah.nongnu.org/download/rdiff-backup/ rdiff-backup-(1.2.*)\.tar.gz
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment