From 18984c9d2171af79c56fc6238e9e409d062fbade Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Apr 26 2010 14:11:01 +0000 Subject: - fix invalid EA metainformation in dump, add workaround to restore (#576525) --- diff --git a/dump-rh576525.patch b/dump-rh576525.patch new file mode 100644 index 0000000..4631d8f --- /dev/null +++ b/dump-rh576525.patch @@ -0,0 +1,35 @@ +--- a/dump/traverse.c ++++ b/dump/traverse.c +@@ -833,6 +833,8 @@ dump_xattr(dump_ino_t ino, struct dinode *dp) { + spcl.c_flags |= DR_EXTATTRIBUTES; + spcl.c_extattributes = EXT_XATTR; + spcl.c_count = howmany(EXT2_INODE_SIZE(fs->super), TP_BSIZE); ++ for (i = 0; i < spcl.c_count; i++) ++ spcl.c_addr[i] = 1; + writeheader(ino); + for (i = 0, cp = xattr; i < spcl.c_count; i++, cp += TP_BSIZE) + writerec(cp, 0); +--- a/restore/tape.c ++++ b/restore/tape.c +@@ -1238,12 +1238,20 @@ readxattr(char *buffer) + skipfile(); + return (FAIL); + } +- ++ + memset(xattrbuf, 0, XATTR_MAXSIZE); + xattrlen = 0; + ++ /* ++ * ugly hack: cope with invalid spcl.c_addr[] records written by ++ * old versions of dump. ++ */ ++ readmapflag = 1; ++ + getfile(xtrxattr, xtrnull); + ++ readmapflag = 0; ++ + memcpy(buffer, xattrbuf, XATTR_MAXSIZE); + + return (GOOD); diff --git a/dump.spec b/dump.spec index 844658d..0526918 100644 --- a/dump.spec +++ b/dump.spec @@ -7,7 +7,7 @@ Summary: Programs for backing up and restoring ext2/ext3 filesystems Name: dump Epoch: 1 Version: 0.4 -Release: 0.5.%{PREVER}%{?dist} +Release: 0.6.%{PREVER}%{?dist} License: BSD Group: Applications/Archiving URL: http://dump.sourceforge.net/ @@ -25,6 +25,7 @@ Provides: dump-static Patch0: dump-rh507948.patch Patch1: dump-rh568457.patch +Patch2: dump-rh576525.patch %description The dump package contains both dump and restore. Dump examines files @@ -52,6 +53,7 @@ restoring files from a backup), and tar (an archiving program). %patch0 -p1 -b .rh507948 %patch1 -p2 -b .rh568457 +%patch2 -p1 -b .rh576525 for i in THANKS MAINTAINERS COPYRIGHT CHANGES; do iconv -f iso-8859-1 -t utf-8 $i -o $i.new @@ -126,6 +128,9 @@ rm -rf %{buildroot} %{_mandir}/man8/rmt.8* %changelog +* Mon Apr 26 2010 Adam Tkac 0.4-0.6.b42 +- fix invalid EA metainformation in dump, add workaround to restore (#576525) + * Thu Mar 4 2010 Jan Görig 0.4-0.5.b42 - don't set extended attributes when in read only mode (#568457)