SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Debians own patches
Author Message
Post Debians own patches 
Hi Ben,

Debian distributes rdiff-backup containing this patch:

http://lists.gnu.org/archive/html/rdiff-backup-users/2004-06/msg00083.html

It doesn't apply cleanly to 1.1.0, so I'm wondering if it is required
any more, and if it is, could it be merged into 1.1.1?

Speaking about debian, it also contains the following two patches, which
I've attached. Could these also be merged into the next release?

Thanks,
Blair

--
Blair Zajac, Ph.D.
<blair < at > orcaware.com>
Subversion and Orca training and consulting
http://www.orcaware.com/svn/

#!/bin/sh -e
## afs-hardlinks.dpatch by Alec Berryman <alec < at > thened.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fixes AFS hard link handling by testing if able to hard link across
## DP: directories.

if [ $# -lt 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
-patch) patch $patch_opts -p0 < $0;;
-unpatch) patch $patch_opts -p0 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac

exit 0

< at > DPATCH < at >
--- rdiff_backup/fs_abilities.py.orig 2004-08-30 23:46:15.000000000 -0400
+++ rdiff_backup/fs_abilities.py 2004-08-30 23:49:02.000000000 -0400
< at > < at > -200,9 +200,11 < at > < at >
tmp_rp.delete()

def set_hardlinks(self, testdir):
- """Set self.hardlinks to true iff hard linked files can be made"""
+ """Set self.hardlinks to true if hard linked files can be made"""
hl_source = testdir.append("hardlinked_file1")
- hl_dest = testdir.append("hardlinked_file2")
+ hl_dir = testdir.append("hl")
+ hl_dir.mkdir()
+ hl_dest = hl_dir.append("hardlinked_file2")
hl_source.touch()
try:
hl_dest.hardlink(hl_source.path)

#!/bin/sh -e
## no-compress-regexp by Alec Berryman <alec < at > thened.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Adds several file suffixes not to compress

if [ $# -lt 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
-patch) patch $patch_opts -p0 < $0;;
-unpatch) patch $patch_opts -p0 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac

exit 0

< at > DPATCH < at >
--- rdiff_backup/Globals.py.old 2004-09-20 00:12:49.000000000 -0400
+++ rdiff_backup/Globals.py 2004-09-20 00:14:59.000000000 -0400
< at > < at > -166,7 +166,9 < at > < at >
# to .snapshots and .diffs). The second below will be the
# compiled version of the first.
no_compression_regexp_string = "(?i).*\\.(gz|z|bz|bz2|tgz|zip|rpm|deb|" \
- "jpg|gif|png|jp2|mp3|ogg|avi|wmv|mpeg|mpg|rm|mov|flac|shn)$"
+ "jpg|jpeg|gif|png|jp2|mp3|ogg|avi|wmv|mpeg|" \
+ "mpg|rm|mov|flac|shn|pgp|gpg|rz|lzh|zoo|" \
+ "lharc|rar|arj|asc)$"
no_compression_regexp = None

# If true, filelists and directory statistics will be split on
--- rdiff-backup.1 2004-09-20 00:18:25.000000000 -0400
+++ new-rdiff-backup.1 2004-09-20 00:38:41.000000000 -0400
< at > < at > -239,8 +239,8 < at > < at >
.TP
.B "--no-compression-regexp " regexp
Do not compress increments based on files whose filenames match regexp.
-The default is
-"(?i).*\\.(gz|z|bz|bz2|tgz|zip|rpm|deb|jpg|gif|png|jp2|mp3|ogg|avi|wmv|mpeg|mpg|rm|mov)$"
+The default includes many common audiovisual and archive files, and
+may be found in Globals.py.
.TP
.B --no-file-statistics
This will disable writing to the file_statistics file in the

Post Debians own patches 
Blair Zajac <blair < at > orcaware.com>
wrote the following on Mon, 24 Oct 2005 22:29:13 -0700

Debian distributes rdiff-backup containing this patch:

http://lists.gnu.org/archive/html/rdiff-backup-users/2004-06/msg00083.html

It doesn't apply cleanly to 1.1.0, so I'm wondering if it is required
any more, and if it is, could it be merged into 1.1.1?

Oops, did I forget to include that all this time? I'm getting a 404
on the actual patch from that page though.

Speaking about debian, it also contains the following two patches, which
I've attached. Could these also be merged into the next release?

Thanks, I merged both; they will be in 1.0.3/1.1.1.


--
Ben Escoto

Post Debians own patches 
Ben Escoto wrote:
Blair Zajac <blair < at > orcaware.com>
wrote the following on Mon, 24 Oct 2005 22:29:13 -0700

Debian distributes rdiff-backup containing this patch:

http://lists.gnu.org/archive/html/rdiff-backup-users/2004-06/msg00083.html

It doesn't apply cleanly to 1.1.0, so I'm wondering if it is required
any more, and if it is, could it be merged into 1.1.1?


Oops, did I forget to include that all this time? I'm getting a 404
on the actual patch from that page though.

OK. I'm attaching the patch here.

Speaking about debian, it also contains the following two patches, which
I've attached. Could these also be merged into the next release?


Thanks, I merged both; they will be in 1.0.3/1.1.1.

Thanks!

Regards,
Blair

--
Blair Zajac, Ph.D.
<blair < at > orcaware.com>
Subversion and Orca training and consulting
http://www.orcaware.com/svn/

#!/bin/sh -e
## rdiff-backup-hardlinks.dpatch by David Vasilevsky <djvasi < at > gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fixes hardlink issues
## DP: http://lists.gnu.org/archive/html/rdiff-backup-users/2004-06/msg00083.html

if [ $# -lt 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
-patch) patch $patch_opts -p0 < $0;;
-unpatch) patch $patch_opts -p0 -R < $0;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1;;
esac

exit 0

< at > DPATCH < at >
--- rdiff_backup/Globals.py 2005-09-11 03:38:01.000000000 +0000
+++ rdiff_backup/Globals.py 2005-09-29 15:08:35.661693448 +0000
< at > < at > -158,6 +158,10 < at > < at >
# hardlink information regardless.
preserve_hardlinks = 1

+# If true, then never enable preserve_hardlinks, regardless of whether
+# a filesystem support hard-links.
+no_hard_links = 0
+
# If this is false, then rdiff-backup will not compress any
# increments. Default is to compress based on regexp below.
compression = 1
--- rdiff_backup/Main.py 2005-09-11 03:38:01.000000000 +0000
+++ rdiff_backup/Main.py 2005-09-29 15:14:47.793120872 +0000
< at > < at > -151,6 +151,7 < at > < at >
elif opt == "--no-eas": Globals.set("eas_active", 0)
elif opt == "--no-file-statistics": Globals.set('file_statistics', 0)
elif opt == "--no-hard-links": Globals.set('preserve_hardlinks', 0)
+ elif opt == "--no-hard-links": Globals.set('no_hard_links', 1)
elif opt == "--null-separator": Globals.set("null_separator", 1)
elif opt == "--override-chars-to-quote":
Globals.set('chars_to_quote', arg)
< at > < at > -431,7 +432,8 < at > < at >
"disabled on destination filesystem")

if Globals.preserve_hardlinks != 0:
- SetConnections.UpdateGlobal('preserve_hardlinks', dest_fsa.hardlinks)
+ SetConnections.UpdateGlobal('preserve_hardlinks', dest_fsa.hardlinks and
+ not Globals.no_hard_links)
SetConnections.UpdateGlobal('fsync_directories', dest_fsa.fsync_dirs)
SetConnections.UpdateGlobal('change_ownership', dest_fsa.ownership)
SetConnections.UpdateGlobal('chars_to_quote', dest_fsa.chars_to_quote)
< at > < at > -540,7 +542,8 < at > < at >
"disabled on destination filesystem")

if Globals.preserve_hardlinks != 0:
- SetConnections.UpdateGlobal('preserve_hardlinks', target_fsa.hardlinks)
+ SetConnections.UpdateGlobal('preserve_hardlinks', target_fsa.hardlinks and
+ not Globals.no_hard_links)
SetConnections.UpdateGlobal('change_ownership', target_fsa.ownership)

if Globals.chars_to_quote is None: # otherwise already overridden
< at > < at > -719,7 +722,8 < at > < at >
('carbonfile_active', 'carbonfile_write', 'carbonfile_conn'))

if Globals.preserve_hardlinks != 0:
- SetConnections.UpdateGlobal('preserve_hardlinks', fsa.hardlinks)
+ SetConnections.UpdateGlobal('preserve_hardlinks', fsa.hardlinks and
+ not Globals.no_hard_links)
SetConnections.UpdateGlobal('fsync_directories', fsa.fsync_dirs)
SetConnections.UpdateGlobal('change_ownership', fsa.ownership)
SetConnections.UpdateGlobal('chars_to_quote', fsa.chars_to_quote)
--- rdiff_backup/rpath.py 2005-09-11 03:38:01.000000000 +0000
+++ rdiff_backup/rpath.py 2005-09-29 15:16:02.930698224 +0000
< at > < at > -154,9 +154,11 < at > < at >
assert rpin.lstat() == rpout.lstat() or rpin.isspecial()
if Globals.change_ownership: rpout.chown(*user_group.map_rpath(rpin))
if rpin.issym(): return # symlinks don't have times or perms
- if Globals.resource_forks_write and rpin.isreg():
+ if (Globals.resource_forks_write and rpin.isreg() and
+ not rpin.isflaglinked()):
rpout.write_resource_fork(rpin.get_resource_fork())
- if Globals.carbonfile_write and rpin.isreg():
+ if (Globals.carbonfile_write and rpin.isreg() and
+ not rpin.isflaglinked()):
rpout.write_carbonfile(rpin.get_carbonfile())
if Globals.eas_write: rpout.write_ea(rpin.get_ea())
rpout.chmod(rpin.getperms())

Post Debians own patches 
Blair Zajac <blair < at > orcaware.com>
wrote the following on Tue, 25 Oct 2005 01:18:35 -0700

Oops, did I forget to include that all this time? I'm getting a 404
on the actual patch from that page though.

OK. I'm attaching the patch here.

I just got around to looking at this.. But I don't really see what
problem it fixes. Apparently the issue is with --no-hard-links, but
on my system that seems to work fine:

~ $ md in
~ $ touch in/foo
~ $ ln in/foo in/bar
~ $ ls -l in/
total 8
-rw-r--r-- 2 ben ben 0 Oct 31 00:18 bar
-rw-r--r-- 2 ben ben 0 Oct 31 00:18 foo
~ $ rdiff-backup --no-hard-links in out
~ $ ls -l out
total 16
-rw-r--r-- 1 ben ben 0 Oct 31 00:18 bar
-rw-r--r-- 1 ben ben 0 Oct 31 00:18 foo
drwx------ 3 ben ben 4096 Oct 31 00:19 rdiff-backup-data/

The files are correctly unlinked in the out directory.


--
Ben Escoto

Post Debians own patches 
Ben Escoto wrote:
Blair Zajac <blair < at > orcaware.com>
wrote the following on Tue, 25 Oct 2005 01:18:35 -0700

Oops, did I forget to include that all this time? I'm getting a 404
on the actual patch from that page though.

OK. I'm attaching the patch here.


I just got around to looking at this.. But I don't really see what
problem it fixes. Apparently the issue is with --no-hard-links, but
on my system that seems to work fine:

~ $ md in
~ $ touch in/foo
~ $ ln in/foo in/bar
~ $ ls -l in/
total 8
-rw-r--r-- 2 ben ben 0 Oct 31 00:18 bar
-rw-r--r-- 2 ben ben 0 Oct 31 00:18 foo
~ $ rdiff-backup --no-hard-links in out
~ $ ls -l out
total 16
-rw-r--r-- 1 ben ben 0 Oct 31 00:18 bar
-rw-r--r-- 1 ben ben 0 Oct 31 00:18 foo
drwx------ 3 ben ben 4096 Oct 31 00:19 rdiff-backup-data/

The files are correctly unlinked in the out directory.

I don't know.

Maybe Dave Vasilevsky, the original author of the patch can explain it,
who I've cc'ed.

BTW, here's the log message in Debian's change log. Not that it's
saying anything more than what's already said:

Added rdiff-backup-hardlinks.dpatch to insure flag '--no-hard-links' is
not overridden by filesystem abilities and to fix handling of hard links
on Mac OS X (Thanks to Dave Vasilevsky <djvasi < at > gmail.com>).

Regards,
Blair

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB