diff --git a/dump-immutable.patch b/dump-immutable.patch new file mode 100644 index 0000000..5f87757 --- /dev/null +++ b/dump-immutable.patch @@ -0,0 +1,92 @@ +diff -ur dump-0.4b41.orig/restore/dirs.c dump-0.4b41/restore/dirs.c +--- dump-0.4b41.orig/restore/dirs.c 2005-05-28 13:34:47.000000000 -0500 ++++ dump-0.4b41/restore/dirs.c 2007-01-26 18:32:02.000000000 -0600 +@@ -710,6 +710,10 @@ + cp = myname(ep); + (void) chown(cp, node.uid, node.gid); + (void) chmod(cp, node.mode); ++ utimes(cp, node.timep); ++ if (node.xattr) ++ xattr_extract(cp, xattr); ++ ep->e_flags &= ~NEW; + if (node.flags) + #ifdef __linux__ + (void) lsetflags(cp, node.flags); +@@ -719,10 +723,6 @@ + (void) chflags(cp, node.flags); + #endif + #endif +- utimes(cp, node.timep); +- if (node.xattr) +- xattr_extract(cp, xattr); +- ep->e_flags &= ~NEW; + } + } + if (ferror(mf)) +diff -ur dump-0.4b41.orig/restore/tape.c dump-0.4b41/restore/tape.c +--- dump-0.4b41.orig/restore/tape.c 2007-01-26 18:14:25.000000000 -0600 ++++ dump-0.4b41/restore/tape.c 2007-01-26 18:51:52.000000000 -0600 +@@ -908,6 +908,8 @@ + } + (void) chown(name, curfile.dip->di_uid, curfile.dip->di_gid); + (void) chmod(name, mode); ++ extractattr(name); ++ utimes(name, timep); + if (flags) + #ifdef __linux__ + (void) lsetflags(name, flags); +@@ -922,8 +924,6 @@ + #endif + #endif + skipfile(); +- extractattr(name); +- utimes(name, timep); + return (GOOD); + + case IFCHR: +@@ -944,6 +944,8 @@ + } + (void) chown(name, curfile.dip->di_uid, curfile.dip->di_gid); + (void) chmod(name, mode); ++ extractattr(name); ++ utimes(name, timep); + if (flags) + #ifdef __linux__ + { +@@ -964,8 +966,6 @@ + #endif + #endif + skipfile(); +- extractattr(name); +- utimes(name, timep); + return (GOOD); + + case IFREG: +@@ -994,6 +994,8 @@ + skipfile(); + (void) chown(name, luid, lgid); + (void) chmod(name, mode); ++ extractattr(name); ++ utimes(name, timep); + if (flags) + #ifdef __linux__ + (void) lsetflags(name, flags); +@@ -1007,8 +1009,6 @@ + (void) chflags(name, flags); + #endif + #endif +- extractattr(name); +- utimes(name, timep); + return (GOOD); + } + } +@@ -1216,8 +1216,8 @@ + (void) fchown(ofile, uid, gid); + (void) fchmod(ofile, mode); + (void) close(ofile); +- (void) lsetflags(oFileRsrc, flags); + utimes(oFileRsrc, timep); ++ (void) lsetflags(oFileRsrc, flags); + return (GOOD); + } + /* NOTREACHED */ diff --git a/dump.spec b/dump.spec index ae4a366..208bd51 100644 --- a/dump.spec +++ b/dump.spec @@ -3,13 +3,14 @@ Summary: Programs for backing up and restoring ext2/ext3 filesystems Name: dump Version: 0.4b41 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD Group: Applications/Archiving URL: http://dump.sourceforge.net/ Source: dump-%{version}.tar.bz2 Patch0: dump-selinux.patch Patch1: dump-dmfix.patch +Patch2: dump-immutable.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: e2fsprogs-devel >= 1.18, readline-devel >= 4.2 BuildRequires: zlib-devel, bzip2-devel, ncurses-devel @@ -46,6 +47,7 @@ restoring files from a backup), and tar (an archiving program). %setup -q %patch0 -p1 -b .selinux %patch1 -p1 -b .dmfix +%patch2 -p1 -b .orig %build @@ -117,6 +119,9 @@ rm -rf %{buildroot} %{_mandir}/man8/rmt.8* %changelog +* Mon Jan 29 2007 Adam Tkac 0.4b41-4.fc7 +- added Andrew Kroeger's patch. Immutable files are restored correctly + * Wed Jan 18 2007 Adam Tkac 0.4b41-3.fc7 - dump is now linked dynamically - removed termcap dependency