- update to 0.4b42
- patches merged - dump-selinux.patch - dump-dmfix.patch - dump-immutable.patch - dump-0.4b41-libtinfo.patch - dump-rh356121.patch - dump-rh493635.patch - dump-rh490627.patch - dump-rh489853.patch - fix NVR to conform to Fedora policies
This commit is contained in:
parent
90e8234424
commit
d1b494eff5
@ -1,5 +1 @@
|
||||
dump-0.4b37.tar.gz
|
||||
dump-0.4b38.tar.bz2
|
||||
dump-0.4b39.tar.bz2
|
||||
dump-0.4b40.tar.bz2
|
||||
dump-0.4b41.tar.bz2
|
||||
dump-0.4b42.tar.gz
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
diff -up dump-0.4b41/configure.in.libtinfo dump-0.4b41/configure.in
|
||||
--- dump-0.4b41/configure.in.libtinfo 2008-01-11 12:31:37.000000000 +0100
|
||||
+++ dump-0.4b41/configure.in 2008-01-11 12:32:31.000000000 +0100
|
||||
@@ -477,13 +477,16 @@ dnl Check for ncurses or termcap librari
|
||||
dnl
|
||||
AC_CHECK_LIB(ncurses, tgetent, [ncurses_lib=yes], [ncurses_lib=no])
|
||||
AC_CHECK_LIB(termcap, tgetent, [termcap_lib=yes], [termcap_lib=no])
|
||||
+AC_CHECK_LIB(tinfo, tgetent, [tinfo_lib=yes], [tinfo_lib=no])
|
||||
|
||||
-if test "$ncurses_lib" = no -a "$termcap_lib" = no; then
|
||||
+if test "$ncurses_lib" = no -a "$termcap_lib" = no -a "$tinfo_lib" = no; then
|
||||
if test "$READLINE" = "yes"; then
|
||||
AC_MSG_ERROR(You need to install the ncurses or termcap library or configure without --enable-readline)
|
||||
fi
|
||||
fi
|
||||
-if test "$ncurses_lib" = yes; then
|
||||
+if test "$tinfo_lib" = yes; then
|
||||
+ rdllib="-ltinfo"
|
||||
+elif test "$ncurses_lib" = yes; then
|
||||
rdllib="-lncurses"
|
||||
elif test "$termcap_lib" = yes; then
|
||||
rdllib="-ltermcap"
|
||||
@ -1,11 +0,0 @@
|
||||
--- dump-0.4b41/configure.in.dmfix 2006-08-07 12:31:00.000000000 +0200
|
||||
+++ dump-0.4b41/configure.in 2006-08-07 12:34:01.000000000 +0200
|
||||
@@ -468,7 +468,7 @@
|
||||
AC_CHECK_LIB(blkid, blkid_get_devname, [blkid_lib=yes], [blkid_lib=no], [-luuid])
|
||||
if test "$blkid_h" = yes -a "$blkid_lib" = yes; then
|
||||
AC_DEFINE([HAVE_BLKID],1,[Define this if you have the blkid library.])
|
||||
- BLKID="-lblkid -luuid"
|
||||
+ BLKID="-lblkid -luuid -ldevmapper -lselinux -lsepol"
|
||||
fi
|
||||
AC_SUBST(BLKID)
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
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 */
|
||||
@ -1,12 +0,0 @@
|
||||
diff -up dump-0.4b41/dump/dump.8.in.rh356121 dump-0.4b41/dump/dump.8.in
|
||||
--- dump-0.4b41/dump/dump.8.in.rh356121 2009-03-09 11:44:29.000000000 +0100
|
||||
+++ dump-0.4b41/dump/dump.8.in 2009-03-09 11:45:30.000000000 +0100
|
||||
@@ -94,7 +94,7 @@ option below). A level number above 0, i
|
||||
.B dump
|
||||
to
|
||||
copy all files new or modified since the last dump of a lower level. The
|
||||
-default level is 9. Historically only levels 0 to 9 were usable in
|
||||
+default level is 0. Historically only levels 0 to 9 were usable in
|
||||
dump, this version is able to understand any integer as a dump level.
|
||||
.TP
|
||||
.BI \-a
|
||||
@ -1,60 +0,0 @@
|
||||
diff -up dump-0.4b41/dump/dump.8.in.rh489853 dump-0.4b41/dump/dump.8.in
|
||||
--- dump-0.4b41/dump/dump.8.in.rh489853 2009-04-06 16:50:26.042022876 +0200
|
||||
+++ dump-0.4b41/dump/dump.8.in 2009-04-06 16:51:04.966485882 +0200
|
||||
@@ -434,7 +434,7 @@ option causes
|
||||
.B dump
|
||||
to print out, for all file systems in
|
||||
.I __DUMPDATES__ ,
|
||||
-and regognized file systems in
|
||||
+and recognized file systems in
|
||||
.I /etc/mtab
|
||||
and
|
||||
.IR /etc/fstab .
|
||||
@@ -598,7 +598,7 @@ correctly with either pre-0.4b34 or 0.4b
|
||||
.B dump
|
||||
provided that the machine on which
|
||||
.B dump
|
||||
-is run did not change timezones (which should be a fairly rare occurence).
|
||||
+is run did not change timezones (which should be a fairly rare occurrence).
|
||||
.SH EXIT STATUS
|
||||
.B Dump
|
||||
exits with zero status on success. Startup errors are indicated with an exit
|
||||
@@ -615,7 +615,7 @@ from dump can be parsed to look for line
|
||||
When a read error occurs,
|
||||
.B dump
|
||||
prints out the corresponding physical disk block and sector number and the
|
||||
-ext2/3 logical block number. It doesn't print out the corresponing file name or
|
||||
+ext2/3 logical block number. It doesn't print out the corresponding file name or
|
||||
even the inode number. The user has to use
|
||||
.BR debugfs (8),
|
||||
commands
|
||||
@@ -652,7 +652,7 @@ The
|
||||
backup suite was ported to Linux's Second Extended File System by Remy Card
|
||||
<card@Linux.EU.Org>. He maintained the initial versions of
|
||||
.B dump
|
||||
-(up and including 0.4b4, released in january 1997).
|
||||
+(up and including 0.4b4, released in January 1997).
|
||||
.PP
|
||||
Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>.
|
||||
.SH AVAILABILITY
|
||||
diff -up dump-0.4b41/restore/restore.8.in.rh489853 dump-0.4b41/restore/restore.8.in
|
||||
--- dump-0.4b41/restore/restore.8.in.rh489853 2009-04-06 16:51:15.498003818 +0200
|
||||
+++ dump-0.4b41/restore/restore.8.in 2009-04-06 16:51:31.606435999 +0200
|
||||
@@ -377,7 +377,7 @@ prevents hierarchical restoration of com
|
||||
.BI \-H " hash_size"
|
||||
Use a hashtable having the specified number of entries for storing the
|
||||
directories entries instead of a linked list. This hashtable will
|
||||
-considerably speed up inode lookups (visible especialy in interactive
|
||||
+considerably speed up inode lookups (visible especially in interactive
|
||||
mode when adding/removing files from the restore list), but at the
|
||||
price of much more memory usage. The default value is 1, meaning no
|
||||
hashtable is used.
|
||||
@@ -751,7 +751,7 @@ The
|
||||
backup suite was ported to Linux's Second Extended File System by Remy Card
|
||||
<card@Linux.EU.Org>. He maintained the initial versions of
|
||||
.B dump
|
||||
-(up and including 0.4b4, released in january 1997).
|
||||
+(up and including 0.4b4, released in January 1997).
|
||||
.PP
|
||||
Starting with 0.4b5, the new maintainer is Stelian Pop <stelian@popies.net>.
|
||||
.SH AVAILABILITY
|
||||
@ -1,23 +0,0 @@
|
||||
diff -up dump-0.4b41/restore/main.c.rh490627 dump-0.4b41/restore/main.c
|
||||
--- dump-0.4b41/restore/main.c.rh490627 2009-04-06 16:48:15.730002753 +0200
|
||||
+++ dump-0.4b41/restore/main.c 2009-04-06 16:48:24.578003355 +0200
|
||||
@@ -727,7 +727,7 @@ usage(void)
|
||||
"\t%s -i [-acd" tseflag "hH" kerbflag "lmMouvVy] [-A file] [-b blocksize] " tsEflag"\n"
|
||||
"\t%s [-f file] [-F script] " qfaflag "[-s fileno]\n"
|
||||
#ifdef USE_QFA
|
||||
- "\t%s -P file [-acdhH" kerbflag "lmMuvVy] [-A file] [-b blocksize]\n"
|
||||
+ "\t%s -P file [-acdhH" kerbflag "lmMuvVy] [-b blocksize]\n"
|
||||
"\t%s [-f file] [-F script] [-s fileno] [-X filelist] [file ...]\n"
|
||||
#endif
|
||||
"\t%s -r [-cd" tseflag "H" kerbflag "lMuvVy] [-b blocksize] " tsEflag"\n"
|
||||
diff -up dump-0.4b41/restore/restore.8.in.rh490627 dump-0.4b41/restore/restore.8.in
|
||||
--- dump-0.4b41/restore/restore.8.in.rh490627 2009-04-06 16:46:35.046519977 +0200
|
||||
+++ dump-0.4b41/restore/restore.8.in 2009-04-06 16:47:03.318003509 +0200
|
||||
@@ -54,7 +54,6 @@ restore \- restore files or file systems
|
||||
.B restore \-P
|
||||
.I file
|
||||
[\fB\-acdhHklmMNuvVy\fR]
|
||||
-[\fB\-A \fIfile\fR]
|
||||
[\fB\-b \fIblocksize\fR]
|
||||
[\fB\-f \fIfile\fR]
|
||||
[\fB\-F \fIscript\fR]
|
||||
@ -1,12 +0,0 @@
|
||||
diff -up dump-0.4b41/dump/main.c.rh493635 dump-0.4b41/dump/main.c
|
||||
--- dump-0.4b41/dump/main.c.rh493635 2009-04-06 16:28:17.534367185 +0200
|
||||
+++ dump-0.4b41/dump/main.c 2009-04-06 16:32:15.762151077 +0200
|
||||
@@ -239,6 +239,8 @@ main(int argc, char *argv[])
|
||||
quit("TP_BSIZE must be a multiple of DEV_BSIZE\n");
|
||||
memset(&lastlevel, 0, NUM_STR_SIZE);
|
||||
memset(&level, 0, NUM_STR_SIZE);
|
||||
+ /* Default dump level is zero. */
|
||||
+ level[0] = '0';
|
||||
|
||||
if (argc < 2)
|
||||
usage();
|
||||
@ -1,408 +0,0 @@
|
||||
Index: dump/configure.in
|
||||
===================================================================
|
||||
RCS file: /cvsroot/dump/dump/configure.in,v
|
||||
retrieving revision 1.40
|
||||
diff -u -p -r1.40 configure.in
|
||||
--- dump/configure.in 2 May 2005 15:10:44 -0000 1.40
|
||||
+++ dump/configure.in 17 Jun 2006 01:14:39 -0000
|
||||
@@ -253,6 +253,29 @@ fi
|
||||
echo "Not including Mac OSX restore compatibility code by default"
|
||||
)
|
||||
|
||||
+dnl
|
||||
+dnl Handle --enable-transselinux
|
||||
+dnl
|
||||
+AC_ARG_ENABLE([transselinux],
|
||||
+[ --enable-transselinux restore can translate SELinux EAs (default is YES)],
|
||||
+if test "$enableval" = "yes"
|
||||
+then
|
||||
+ LTRANSSELINUX="-lselinux"
|
||||
+ CCTRANSSELINUX="-DTRANSSELINUX"
|
||||
+ echo "restore can translate SELinux EAs"
|
||||
+else
|
||||
+ LTRANSSELINUX=""
|
||||
+ CCTRANSSELINUX=""
|
||||
+ echo "restore can not translate SELinux EAs"
|
||||
+fi
|
||||
+,
|
||||
+LTRANSSELINUX="-lselinux"
|
||||
+CCTRANSSELINUX="-DTRANSSELINUX"
|
||||
+echo "restore can translate SELinux EAs by default"
|
||||
+)
|
||||
+AC_SUBST(LTRANSSELINUX)
|
||||
+AC_SUBST(CCTRANSSELINUX)
|
||||
+
|
||||
|
||||
dnl
|
||||
dnl set $(CC) from --with-cc=value
|
||||
Index: dump/restore/Makefile.in
|
||||
===================================================================
|
||||
RCS file: /cvsroot/dump/dump/restore/Makefile.in,v
|
||||
retrieving revision 1.13
|
||||
diff -u -p -r1.13 Makefile.in
|
||||
--- dump/restore/Makefile.in 2 May 2005 15:10:46 -0000 1.13
|
||||
+++ dump/restore/Makefile.in 17 Jun 2006 01:14:39 -0000
|
||||
@@ -7,9 +7,9 @@ top_builddir= ..
|
||||
@MCONFIG@
|
||||
|
||||
INC= -I$(top_srcdir)/restore
|
||||
-ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) @RESTOREDEBUG@
|
||||
+ALL_CFLAGS= @CPPFLAGS@ @CFLAGS@ @CCOPTS@ @CCTRANSSELINUX@ -pipe $(OPT) $(GINC) $(INC) $(DEFS) @RESTOREDEBUG@
|
||||
ALL_LDFLAGS= @LDFLAGS@ @LDOPTS@ @STATIC@
|
||||
-LIBS= $(GLIBS) -le2p @READLINE@ @ZLIB@ @BZLIB@
|
||||
+LIBS= $(GLIBS) -le2p @READLINE@ @ZLIB@ @BZLIB@ @LTRANSSELINUX@
|
||||
DEPLIBS= ../compat/lib/libcompat.a
|
||||
|
||||
PROG= restore
|
||||
Index: dump/restore/main.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/dump/dump/restore/main.c,v
|
||||
retrieving revision 1.50
|
||||
diff -u -p -r1.50 main.c
|
||||
--- dump/restore/main.c 7 Jul 2005 09:16:08 -0000 1.50
|
||||
+++ dump/restore/main.c 17 Jun 2006 01:14:39 -0000
|
||||
@@ -127,6 +127,11 @@ unsigned long qfadumpdate;
|
||||
long long curtapepos;
|
||||
#endif /* USE_QFA */
|
||||
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+int transselinuxflag = 0;
|
||||
+char *transselinuxarg = NULL;
|
||||
+#endif
|
||||
+
|
||||
long smtc_errno;
|
||||
|
||||
#if defined(__linux__) || defined(sunos)
|
||||
@@ -157,6 +162,9 @@ main(int argc, char *argv[])
|
||||
tapeposflag = 0;
|
||||
createtapeposflag = 0;
|
||||
#endif /* USE_QFA */
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+ char transselinuxopt;
|
||||
+#endif
|
||||
|
||||
/* Temp files should *not* be readable. We set permissions later. */
|
||||
orig_umask = umask(FORCED_UMASK);
|
||||
@@ -178,7 +186,11 @@ main(int argc, char *argv[])
|
||||
;
|
||||
obsolete(&argc, &argv);
|
||||
while ((ch = getopt(argc, argv,
|
||||
- "aA:b:CcdD:f:F:hH:i"
|
||||
+ "aA:b:CcdD:"
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+ "eE:"
|
||||
+#endif
|
||||
+ "f:F:hH:i"
|
||||
#ifdef KERBEROS
|
||||
"k"
|
||||
#endif
|
||||
@@ -211,6 +223,17 @@ main(int argc, char *argv[])
|
||||
strncpy(filesys, optarg, NAMELEN);
|
||||
filesys[NAMELEN - 1] = '\0';
|
||||
break;
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+ case 'e':
|
||||
+ transselinuxflag = 1;
|
||||
+ transselinuxopt = ch;
|
||||
+ break;
|
||||
+ case 'E':
|
||||
+ transselinuxflag = 1;
|
||||
+ transselinuxarg = optarg;
|
||||
+ transselinuxopt = ch;
|
||||
+ break;
|
||||
+#endif
|
||||
case 'T':
|
||||
tmpdir = optarg;
|
||||
break;
|
||||
@@ -340,6 +363,11 @@ main(int argc, char *argv[])
|
||||
if (Afile && command != 'i' && command != 'x' && command != 't')
|
||||
errx(1, "A option is not valid for %c command", command);
|
||||
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+ if (transselinuxflag && !strchr("CirRx", command))
|
||||
+ errx(1, "%c option is not valid for %c command", transselinuxopt, command);
|
||||
+#endif
|
||||
+
|
||||
if (signal(SIGINT, onintr) == SIG_IGN)
|
||||
(void) signal(SIGINT, SIG_IGN);
|
||||
if (signal(SIGTERM, onintr) == SIG_IGN)
|
||||
@@ -447,7 +475,7 @@ main(int argc, char *argv[])
|
||||
comparedirmodes();
|
||||
checkrestore();
|
||||
if (compare_errors) {
|
||||
- printf("Some files were modified!\n");
|
||||
+ printf("Some files were modified! %d compare errors\n", compare_errors);
|
||||
exit(2);
|
||||
}
|
||||
break;
|
||||
@@ -685,24 +713,31 @@ usage(void)
|
||||
#define qfaflag
|
||||
#endif
|
||||
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+# define tseflag "e"
|
||||
+# define tsEflag "[-E mls] "
|
||||
+#else
|
||||
+# define tseflag
|
||||
+# define tsEflag
|
||||
+#endif
|
||||
fprintf(stderr,
|
||||
"usage:"
|
||||
- "\t%s -C [-cdH" kerbflag "lMvVy] [-b blocksize] [-D filesystem] [-f file]\n"
|
||||
- "\t%s [-F script] [-L limit] [-s fileno]\n"
|
||||
- "\t%s -i [-acdhH" kerbflag "lmMouvVy] [-A file] [-b blocksize] [-f file]\n"
|
||||
- "\t%s [-F script] " qfaflag "[-s fileno]\n"
|
||||
+ "\t%s -C [-cd" tseflag "H" kerbflag "lMvVy] [-b blocksize] [-D filesystem] " tsEflag"\n"
|
||||
+ "\t%s [-f file] [-F script] [-L limit] [-s fileno]\n"
|
||||
+ "\t%s -i [-acd" tseflag "hH" kerbflag "lmMouvVy] [-A file] [-b blocksize] " tsEflag"\n"
|
||||
+ "\t%s [-f file] [-F script] " qfaflag "[-s fileno]\n"
|
||||
#ifdef USE_QFA
|
||||
"\t%s -P file [-acdhH" kerbflag "lmMuvVy] [-A file] [-b blocksize]\n"
|
||||
"\t%s [-f file] [-F script] [-s fileno] [-X filelist] [file ...]\n"
|
||||
#endif
|
||||
- "\t%s -r [-cdH" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script]\n"
|
||||
- "\t%s [-s fileno] [-T directory]\n"
|
||||
- "\t%s -R [-cdH" kerbflag "lMuvVy] [-b blocksize] [-f file] [-F script]\n"
|
||||
- "\t%s [-s fileno] [-T directory]\n"
|
||||
- "\t%s -t [-cdhH" kerbflag "lMuvVy] [-A file] [-b blocksize] [-f file]\n"
|
||||
- "\t%s [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]\n"
|
||||
- "\t%s -x [-acdhH" kerbflag "lmMouvVy] [-A file] [-b blocksize] [-f file]\n"
|
||||
- "\t%s [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]\n",
|
||||
+ "\t%s -r [-cd" tseflag "H" kerbflag "lMuvVy] [-b blocksize] " tsEflag"\n"
|
||||
+ "\t%s [-f file] [-F script] [-s fileno] [-T directory]\n"
|
||||
+ "\t%s -R [-cd" tseflag "H" kerbflag "lMuvVy] [-b blocksize] " tsEflag"\n"
|
||||
+ "\t%s [-f file] [-F script] [-s fileno] [-T directory]\n"
|
||||
+ "\t%s -t [-cdhH" kerbflag "lMuvVy] [-A file] [-b blocksize]\n"
|
||||
+ "\t%s [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]\n"
|
||||
+ "\t%s -x [-acd" tseflag "hH" kerbflag "lmMouvVy] [-A file] [-b blocksize] " tsEflag"\n"
|
||||
+ "\t%s [-f file] [-F script] " qfaflag "[-s fileno] [-X filelist] [file ...]\n",
|
||||
__progname, white,
|
||||
__progname, white,
|
||||
#ifdef USE_QFA
|
||||
Index: dump/restore/restore.h
|
||||
===================================================================
|
||||
RCS file: /cvsroot/dump/dump/restore/restore.h,v
|
||||
retrieving revision 1.33
|
||||
diff -u -p -r1.33 restore.h
|
||||
--- dump/restore/restore.h 7 Jul 2005 09:16:08 -0000 1.33
|
||||
+++ dump/restore/restore.h 17 Jun 2006 01:14:39 -0000
|
||||
@@ -190,6 +190,11 @@ char smtcpath[2048];
|
||||
#endif
|
||||
#endif /* USE_QFA */
|
||||
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+extern int transselinuxflag;
|
||||
+extern char *transselinuxarg;
|
||||
+#endif
|
||||
+
|
||||
#define do_compare_error \
|
||||
if (++compare_errors >= Lflag && Lflag) { \
|
||||
printf("Compare errors limit reached, exiting...\n"); \
|
||||
Index: dump/restore/tape.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/dump/dump/restore/tape.c,v
|
||||
retrieving revision 1.90
|
||||
diff -u -p -r1.90 tape.c
|
||||
--- dump/restore/tape.c 8 Jun 2005 13:24:11 -0000 1.90
|
||||
+++ dump/restore/tape.c 17 Jun 2006 01:14:39 -0000
|
||||
@@ -570,6 +570,8 @@ again:
|
||||
}
|
||||
if (haderror || (bot_code && !Mflag)) {
|
||||
haderror = 0;
|
||||
+ if (compare_errors)
|
||||
+ fprintf(stderr, "%d compare errors so far\n", compare_errors);
|
||||
#ifdef sunos
|
||||
fprintf(stderr, "Mount volume %ld\n", (long)newvol);
|
||||
#else
|
||||
Index: dump/restore/xattr.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/dump/dump/restore/xattr.c,v
|
||||
retrieving revision 1.3
|
||||
diff -u -p -r1.3 xattr.c
|
||||
--- dump/restore/xattr.c 8 Jun 2005 13:24:12 -0000 1.3
|
||||
+++ dump/restore/xattr.c 17 Jun 2006 01:14:39 -0000
|
||||
@@ -43,6 +43,9 @@ static const char rcsid[] =
|
||||
#include <errno.h>
|
||||
#include <bsdcompat.h>
|
||||
#include <protocols/dumprestore.h>
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+# include <selinux/selinux.h>
|
||||
+#endif
|
||||
#include "restore.h"
|
||||
#include "extern.h"
|
||||
#include "pathnames.h"
|
||||
@@ -195,12 +198,12 @@ struct ext2_xattr_entry {
|
||||
static int lsetxattr __P((const char *, const char *, void *, size_t, int));
|
||||
static ssize_t lgetxattr __P((const char *, const char *, void *, size_t));
|
||||
static ssize_t llistxattr __P((const char *, char *, size_t));
|
||||
-static int xattr_cb_list __P((char *, char *, int, void *));
|
||||
-static int xattr_cb_set __P((char *, char *, int, void *));
|
||||
-static int xattr_cb_compare __P((char *, char *, int, void *));
|
||||
+static int xattr_cb_list __P((char *, char *, int, int, void *));
|
||||
+static int xattr_cb_set __P((char *, char *, int, int, void *));
|
||||
+static int xattr_cb_compare __P((char *, char *, int, int, void *));
|
||||
static int xattr_verify __P((char *));
|
||||
static int xattr_count __P((char *, int *));
|
||||
-static int xattr_walk __P((char *, int (*)(char *, char *, int, void *), void *));
|
||||
+static int xattr_walk __P((char *, int (*)(char *, char *, int, int, void *), void *));
|
||||
|
||||
static int
|
||||
lsetxattr(const char *path, const char *name, void *value, size_t size, int flags)
|
||||
@@ -406,8 +409,9 @@ fail:
|
||||
*/
|
||||
|
||||
static int
|
||||
-xattr_cb_list(char *name, char *value, int valuelen, void *private)
|
||||
+xattr_cb_list(char *name, char *value, int valuelen, int isSELinux, void *private)
|
||||
{
|
||||
+ isSELinux;
|
||||
value[valuelen] = '\0';
|
||||
printf("EA: %s:%s\n", name, value);
|
||||
|
||||
@@ -415,37 +419,64 @@ xattr_cb_list(char *name, char *value, i
|
||||
}
|
||||
|
||||
static int
|
||||
-xattr_cb_set(char *name, char *value, int valuelen, void *private)
|
||||
+xattr_cb_set(char *name, char *value, int valuelen, int isSELinux, void *private)
|
||||
{
|
||||
char *path = (char *)private;
|
||||
-
|
||||
- if (lsetxattr(path, name, value, valuelen, 0) < 0) {
|
||||
- warn("lsetxattr %s failed", path);
|
||||
+ int err;
|
||||
+
|
||||
+ isSELinux;
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+ if (isSELinux)
|
||||
+ err = lsetfilecon(path, value);
|
||||
+ else
|
||||
+#endif
|
||||
+ err = lsetxattr(path, name, value, valuelen, 0);
|
||||
+
|
||||
+ if (err) {
|
||||
+ warn("%s: EA set %s:%s failed", path, name, value);
|
||||
return FAIL;
|
||||
}
|
||||
+
|
||||
return GOOD;
|
||||
}
|
||||
|
||||
static int
|
||||
-xattr_cb_compare(char *name, char *value, int valuelen, void *private)
|
||||
+xattr_cb_compare(char *name, char *value, int valuelen, int isSELinux, void *private)
|
||||
{
|
||||
char *path = (char *)private;
|
||||
char valuef[XATTR_MAXSIZE];
|
||||
int valuesz;
|
||||
-
|
||||
- valuesz = lgetxattr(path, name, valuef, XATTR_MAXSIZE);
|
||||
- if (valuesz < 0) {
|
||||
- warn("%s: lgetxattr failed\n", path);
|
||||
- return FAIL;
|
||||
+
|
||||
+ isSELinux;
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+ if (isSELinux)
|
||||
+ {
|
||||
+ security_context_t con = NULL;
|
||||
+
|
||||
+ if (lgetfilecon(path, &con) < 0) {
|
||||
+ warn("%s: EA compare lgetfilecon failed\n", path);
|
||||
+ return FAIL;
|
||||
+ }
|
||||
+
|
||||
+ valuesz = strlen(con) + 1;
|
||||
+ valuef[0] = 0;
|
||||
+ strncat(valuef, con, sizeof valuef);
|
||||
+ freecon(con);
|
||||
}
|
||||
-
|
||||
- if (valuesz != valuelen) {
|
||||
- fprintf(stderr, "%s: EA %s value changed\n", path, value);
|
||||
- return FAIL;
|
||||
+ else {
|
||||
+#endif
|
||||
+ valuesz = lgetxattr(path, name, valuef, XATTR_MAXSIZE);
|
||||
+ if (valuesz < 0) {
|
||||
+ warn("%s: EA compare lgetxattr failed\n", path);
|
||||
+ return FAIL;
|
||||
+ }
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
}
|
||||
-
|
||||
- if (memcmp(value, valuef, valuelen)) {
|
||||
- fprintf(stderr, "%s: EA %s value changed\n", path, value);
|
||||
+#endif
|
||||
+
|
||||
+ if (valuesz != valuelen || memcmp(value, valuef, valuelen)) {
|
||||
+ /* GAN24May06: show name and new value for user to compare */
|
||||
+ fprintf(stderr, "%s: EA %s:%s value changed to %s\n", path, name, value, valuef);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -508,7 +539,7 @@ xattr_count(char *buffer, int *count)
|
||||
}
|
||||
|
||||
static int
|
||||
-xattr_walk(char *buffer, int (*xattr_cb)(char *, char *, int, void *), void *private)
|
||||
+xattr_walk(char *buffer, int (*xattr_cb)(char *, char *, int, int, void *), void *private)
|
||||
{
|
||||
struct ext2_xattr_entry *entry;
|
||||
|
||||
@@ -518,6 +549,7 @@ xattr_walk(char *buffer, int (*xattr_cb)
|
||||
char name[XATTR_MAXSIZE], value[XATTR_MAXSIZE];
|
||||
int off;
|
||||
int convertacl = 0;
|
||||
+ int convertcon = 0;
|
||||
|
||||
switch (entry->e_name_index) {
|
||||
case EXT2_XATTR_INDEX_USER:
|
||||
@@ -539,6 +571,9 @@ xattr_walk(char *buffer, int (*xattr_cb)
|
||||
break;
|
||||
case EXT2_XATTR_INDEX_SECURITY:
|
||||
strcpy(name, "security.");
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+ convertcon = transselinuxflag;
|
||||
+#endif
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unknown EA index\n");
|
||||
@@ -564,8 +599,36 @@ xattr_walk(char *buffer, int (*xattr_cb)
|
||||
entry->e_value_size = size;
|
||||
free(acl);
|
||||
}
|
||||
+
|
||||
+#ifdef TRANSSELINUX /*GAN6May06 SELinux MLS */
|
||||
+ if (convertcon && strcmp(name, "security.selinux"))
|
||||
+ convertcon = 0; /*GAN24May06 only for selinux */
|
||||
+
|
||||
+ if (convertcon)
|
||||
+ {
|
||||
+ security_context_t con = NULL;
|
||||
+ int err;
|
||||
+
|
||||
+ if (!transselinuxarg)
|
||||
+ err = security_canonicalize_context(value, &con);
|
||||
+ else {
|
||||
+ strncat(value, transselinuxarg, sizeof value);
|
||||
+ err = security_canonicalize_context_raw(value, &con);
|
||||
+ }
|
||||
+
|
||||
+ if (err < 0) {
|
||||
+ warn("%s: EA canonicalize failed\n", value);
|
||||
+ return FAIL;
|
||||
+ }
|
||||
+
|
||||
+ entry->e_value_size = strlen(con) + 1;
|
||||
+ value[0] = 0;
|
||||
+ strncat(value, con, sizeof value);
|
||||
+ freecon(con);
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
- if (xattr_cb(name, value, entry->e_value_size, private) != GOOD)
|
||||
+ if (xattr_cb(name, value, entry->e_value_size, convertcon, private) != GOOD)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
43
dump.spec
43
dump.spec
@ -1,23 +1,17 @@
|
||||
%define _sbindir /sbin
|
||||
|
||||
%define PREVER b42
|
||||
%define VERSION 0.4%{PREVER}
|
||||
|
||||
Summary: Programs for backing up and restoring ext2/ext3 filesystems
|
||||
Name: dump
|
||||
Version: 0.4b41
|
||||
Release: 13%{?dist}
|
||||
Epoch: 1
|
||||
Version: 0.4
|
||||
Release: 0.1.%{PREVER}%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/Archiving
|
||||
URL: http://dump.sourceforge.net/
|
||||
Source: http://downloads.sourceforge.net/dump/dump-%{version}.tar.bz2
|
||||
#real source is
|
||||
#Source: http://downloads.sourceforge.net/dump/dump-%{version}.tar.gz
|
||||
Patch0: dump-selinux.patch
|
||||
Patch1: dump-dmfix.patch
|
||||
Patch2: dump-immutable.patch
|
||||
Patch4: dump-0.4b41-libtinfo.patch
|
||||
Patch5: dump-rh356121.patch
|
||||
Patch6: dump-rh493635.patch
|
||||
Patch7: dump-rh490627.patch
|
||||
Patch8: dump-rh489853.patch
|
||||
Source: http://downloads.sourceforge.net/dump/dump-%{VERSION}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: e2fsprogs-devel >= 1.18, readline-devel >= 4.2
|
||||
BuildRequires: zlib-devel, bzip2-devel, automake
|
||||
@ -51,15 +45,7 @@ like dump (a filesystem backup program), restore (a program for
|
||||
restoring files from a backup), and tar (an archiving program).
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .selinux
|
||||
%patch1 -p1 -b .dmfix
|
||||
%patch2 -p1 -b .orig
|
||||
%patch4 -p1 -b .libtinfo
|
||||
%patch5 -p1 -b .rh356121
|
||||
%patch6 -p1 -b .rh493635
|
||||
%patch7 -p1 -b .rh490627
|
||||
%patch8 -p1 -b .rh489853
|
||||
%setup -q -n dump-%{VERSION}
|
||||
|
||||
for i in THANKS MAINTAINERS COPYRIGHT CHANGES; do
|
||||
iconv -f iso-8859-1 -t utf-8 $i -o $i.new
|
||||
@ -132,6 +118,19 @@ rm -rf %{buildroot}
|
||||
%{_mandir}/man8/rmt.8*
|
||||
|
||||
%changelog
|
||||
* Mon Jun 22 2009 Adam Tkac <atkac redhat com> 0.4-0.1.b42
|
||||
- update to 0.4b42
|
||||
- patches merged
|
||||
- dump-selinux.patch
|
||||
- dump-dmfix.patch
|
||||
- dump-immutable.patch
|
||||
- dump-0.4b41-libtinfo.patch
|
||||
- dump-rh356121.patch
|
||||
- dump-rh493635.patch
|
||||
- dump-rh490627.patch
|
||||
- dump-rh489853.patch
|
||||
- fix NVR to conform to Fedora policies
|
||||
|
||||
* Mon Apr 04 2009 Adam Tkac <atkac redhat com> 0.4b41-13
|
||||
- display dump level correctly in all cases (#493635)
|
||||
- -A option is not valid when -P is specified, correct manual page (#490627)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user