From b2b876fdc2544ffa01bb41228f50ede90298f638 Mon Sep 17 00:00:00 2001 From: bescoto Date: Tue, 22 Jul 2003 10:44:50 +0000 Subject: Final changes for 0.13.0 (small test changes, Fedora spec packaging) git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@356 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 23 +++++++++++- rdiff-backup/TODO | 2 + rdiff-backup/dist/makedist | 5 +-- rdiff-backup/dist/makerpm | 14 +++---- rdiff-backup/dist/rdiff-backup.spec | 51 -------------------------- rdiff-backup/dist/rdiff-backup.spec.template | 55 ++++++++++++++++++++++++++++ rdiff-backup/rdiff_backup/rpath.py | 4 +- rdiff-backup/testing/FilenameMappingtest.py | 3 +- rdiff-backup/testing/resourceforktest.py | 2 + 9 files changed, 94 insertions(+), 65 deletions(-) delete mode 100644 rdiff-backup/dist/rdiff-backup.spec create mode 100644 rdiff-backup/dist/rdiff-backup.spec.template diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 83e97f6..ae1a62c 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -11,15 +11,29 @@ fsyncing. Options such as --windows-mode, --chars-to-quote, Now rdiff-backup supports user extended attributes (EAs). To take advantage of this you will need the python module pyxattr and a file system that supports EAs. Thanks to Greg Freemyer for valuable -discussion on EA and ACL support. +discussion. Support for access control lists (ACLs) was also added. An ACL capable file system and the python package pylibacl (which exports the -posix1e module) are required. +posix1e module) are required. Thanks to Greg Freemyer for valuable +discussion. Thanks to patches by Daniel Hazelbaker, rdiff-backup now reads and writes Mac OS X style resource forks! +****** Warning ****** The above features are new to this development +release, and it is difficult to test all the possibly combinations of +source and destination file systems. They should not be considered +stable. However, help would be appreciated testing these new +features. + +****** Warning #2 ****** rdiff-backup records ACL and EA information +in files designed to be compatible with the utilities "getfacl" and +"getfattr". However, there is a possible security hole in both these +formats (see +http://acl.bestbits.at/pipermail/acl-devel/2003-June/001498.html). +rdiff-backup's format will be fixed when getf{attr|acl}'s is. + Added --list-increment-sizes switch, which tells you how much space the various backup files take up. (Suggested by Andrew Bressen) @@ -31,6 +45,11 @@ Troels Arvin.) Fixed bug with --check-destination and --windows-mode reported by Tucker Sylvestro. +The librsync blocksize is now chosen based on filesize. This should +make operations on large files faster (in some cases, orders of +magnitude faster). Thanks to Ty! Boyack for bringing this issue to my +attention. + New in v0.12.0 (2003/06/26) --------------------------- diff --git a/rdiff-backup/TODO b/rdiff-backup/TODO index bb65ff6..a203a16 100644 --- a/rdiff-backup/TODO +++ b/rdiff-backup/TODO @@ -4,6 +4,8 @@ by Andrew Bressen. Profile 0.13.0 +Do more large file timing tests? + ---------[ Medium term ]--------------------------------------- Look into sparse file support (requested by Stelios K. Kyriacou) diff --git a/rdiff-backup/dist/makedist b/rdiff-backup/dist/makedist index 511afc6..cc337ff 100755 --- a/rdiff-backup/dist/makedist +++ b/rdiff-backup/dist/makedist @@ -7,8 +7,7 @@ DistDir = "dist" # Various details about the files must also be specified by the rpm # spec template. -spec_template = "dist/rdiff-backup.spec" -#redhat_spec_template = "dist/rdiff-backup.rh7x.spec" +spec_template = "dist/rdiff-backup.spec.template" def CopyMan(destination, version): """Create updated man page at the specified location""" @@ -115,7 +114,7 @@ def MakeTar(): def MakeSpecFile(): """Create spec file using spec template""" - specfile = "rdiff-backup-%s-2.spec" % Version + specfile = "rdiff-backup.spec" VersionedCopy(spec_template, specfile) return specfile diff --git a/rdiff-backup/dist/makerpm b/rdiff-backup/dist/makerpm index cddfdb2..129cbed 100755 --- a/rdiff-backup/dist/makerpm +++ b/rdiff-backup/dist/makerpm @@ -6,23 +6,23 @@ rpmroot = "/home/ben/rpm" if len(sys.argv) == 2: version = sys.argv[1] - specfile = "rdiff-backup-%s-2.spec" % version + specfile = "rdiff-backup.spec" print "Using specfile %s" % specfile else: print "Syntax: %s version_number" % sys.argv[0] sys.exit(1) -base = ".".join(specfile.split(".")[:-1]) -srcrpm = base+".src.rpm" -i386rpm = base+".i386.rpm" -source_rpm = base+".src.rpm" -tarfile = "-".join(base.split("-")[:-1]) + ".tar.gz" +base = "rdiff-backup-%s" % (version,) +tarfile = base + ".tar.gz" +rpmbase = base + "-0.fdr.1" # Fedora suffix, with release number 1 +i386_rpm = rpmbase + ".i386.rpm" +source_rpm = rpmbase + ".src.rpm" # These assume the rpm root directory $HOME/rpm. The # nonstandard location allows for building by non-root user. assert not os.system("cp %s %s/SOURCES" % (tarfile, rpmroot)) #assert not os.system("rpm -ba --sign -vv --target i386 " + specfile) assert not os.system("rpmbuild -ba -v --sign " + specfile) -assert not os.system("mv %s/RPMS/i386/%s ." % (rpmroot, i386rpm)) +assert not os.system("mv %s/RPMS/i386/%s ." % (rpmroot, i386_rpm)) assert not os.system("mv %s/SRPMS/%s ." % (rpmroot, source_rpm)) diff --git a/rdiff-backup/dist/rdiff-backup.spec b/rdiff-backup/dist/rdiff-backup.spec deleted file mode 100644 index 2073b51..0000000 --- a/rdiff-backup/dist/rdiff-backup.spec +++ /dev/null @@ -1,51 +0,0 @@ -%define PYTHON_NAME %((rpm -q --quiet python2 && echo python2) || echo python) - -Version: $version -Summary: Convenient and transparent local/remote incremental mirror/backup -Name: rdiff-backup -Release: 2 -URL: http://www.stanford.edu/~bescoto/rdiff-backup/ -Source: %{name}-%{version}.tar.gz -Copyright: GPL -Group: Applications/Archiving -BuildRoot: %{_tmppath}/%{name}-root -requires: librsync >= 0.9.5.1, %{PYTHON_NAME} >= 2.2 -BuildPrereq: %{PYTHON_NAME}-devel >= 2.2, librsync-devel >= 0.9.5.1 - -%description -rdiff-backup is a script, written in Python, that backs up one -directory to another and is intended to be run periodically (nightly -from cron for instance). The target directory ends up a copy of the -source directory, but extra reverse diffs are stored in the 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 can also 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 from the previous backup will be transmitted. - -%prep -%setup -q - -%build -%{PYTHON_NAME} setup.py build - -%install -%{PYTHON_NAME} setup.py install --prefix=$RPM_BUILD_ROOT/usr - -%clean -[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -/usr/bin/rdiff-backup -/usr/share/man/man1 -/usr/lib -%doc CHANGELOG COPYING FAQ.html README - -%changelog -* Sun Jan 19 2002 Troels Arvin -- Builds, no matter if Python 2.2 is called python2-2.2 or python-2.2. - -* Sun Nov 4 2001 Ben Escoto -- Initial RPM diff --git a/rdiff-backup/dist/rdiff-backup.spec.template b/rdiff-backup/dist/rdiff-backup.spec.template new file mode 100644 index 0000000..0249336 --- /dev/null +++ b/rdiff-backup/dist/rdiff-backup.spec.template @@ -0,0 +1,55 @@ +%define PYTHON_NAME %((rpm -q --quiet python2 && echo python2) || echo python) + +Version: $version +Summary: Convenient and transparent local/remote incremental mirror/backup +Name: rdiff-backup +Release: 0.fdr.1 +Epoch: 0 +URL: http://rdiff-backup.stanford.edu/ +Source: http://rdiff-backup.stanford.edu/%{name}-%{version}.tar.gz +License: GPL +Group: Applications/Archiving +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: librsync >= 0.9.5.1, %{PYTHON_NAME} >= 2.2 +BuildPrereq: %{PYTHON_NAME}-devel >= 2.2, librsync-devel >= 0.9.5.1 + +%description +rdiff-backup is a script, written in Python, that backs up one +directory to another and is intended to be run periodically (nightly +from cron for instance). The target directory ends up a copy of the +source directory, but extra reverse diffs are stored in the 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 can also 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 from the previous backup will be transmitted. + +%prep +%setup -q + +%build +%{PYTHON_NAME} setup.py build + +%install +%{PYTHON_NAME} setup.py install --prefix=$RPM_BUILD_ROOT/usr + +%clean +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_bindir}/rdiff-backup +%{_mandir}/man1/rdiff-backup* +%{_libdir}/ +%doc CHANGELOG COPYING FAQ.html README + +%changelog +* Sun Jul 20 2003 Ben Escoto +- Minor changes to comply with Fedora standards. + +* Sun Jan 19 2002 Troels Arvin +- Builds, no matter if Python 2.2 is called python2-2.2 or python-2.2. + +* Sun Nov 4 2001 Ben Escoto +- Initial RPM diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index c13e003..a04f2ed 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -172,7 +172,8 @@ def cmp_attribs(rp1, rp2): if Globals.change_ownership and rp1.getuidgid() != rp2.getuidgid(): result = None elif rp1.getperms() != rp2.getperms(): result = None - elif rp1.getctime() != rp2.getctime(): result = None + # Don't compare ctime for now, add later + #elif rp1.getctime() != rp2.getctime(): result = None elif rp1.issym() and rp2.issym(): # Don't check times for some types result = 1 elif rp1.isblkdev() and rp2.isblkdev(): result = 1 @@ -662,6 +663,7 @@ class RPath(RORPath): # mtimes on symlinks and dev files don't work consistently data['mtime'] = long(statblock[stat.ST_MTIME]) data['atime'] = long(statblock[stat.ST_ATIME]) + data['ctime'] = long(statblock[stat.ST_CTIME]) return data def check_consistency(self): diff --git a/rdiff-backup/testing/FilenameMappingtest.py b/rdiff-backup/testing/FilenameMappingtest.py index 66ab786..e364c59 100644 --- a/rdiff-backup/testing/FilenameMappingtest.py +++ b/rdiff-backup/testing/FilenameMappingtest.py @@ -5,7 +5,8 @@ from rdiff_backup import FilenameMapping class FilenameMappingTest(unittest.TestCase): """Test the FilenameMapping class, for quoting filenames""" def setUp(self): - """Just initialize quoting - assume windows mode""" + """Just initialize quoting""" + Globals.chars_to_quote = 'A-Z' FilenameMapping.set_init_quote_vals() def testBasicQuote(self): diff --git a/rdiff-backup/testing/resourceforktest.py b/rdiff-backup/testing/resourceforktest.py index 453f2b6..4617b28 100644 --- a/rdiff-backup/testing/resourceforktest.py +++ b/rdiff-backup/testing/resourceforktest.py @@ -64,6 +64,7 @@ class ResourceForkTest(unittest.TestCase): rp1_2.touch() rp1_3.symlink('foo') rp1_1.write_resource_fork('This should appear in resource fork') + rp1_1.chmod(0400) # test for bug changing resource forks after perms rp1_2.write_resource_fork('Data for the resource fork 2') @@ -75,6 +76,7 @@ class ResourceForkTest(unittest.TestCase): rp2_2.touch() rp2_3.touch() rp2_1.write_resource_fork('New data for resource fork 1') + rp2_1.chmod(0400) rp2_3.write_resource_fork('New fork') def testSeriesLocal(self): -- cgit v1.2.1