A file is dumpable if it is sparse and both --sparse and --totals are
specified (#154882)
This commit is contained in:
parent
ff943daf64
commit
6e7f3a84b2
36
tar-1.15.1-sparseTotals.patch
Normal file
36
tar-1.15.1-sparseTotals.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
--- tar-1.15.1/src/create.c.sparseTotals 2005-07-27 11:10:38.000000000 +0200
|
||||||
|
+++ tar-1.15.1/src/create.c 2005-07-27 11:10:50.000000000 +0200
|
||||||
|
@@ -332,16 +332,20 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-/* A file is not dumpable if
|
||||||
|
+/* A file is considered dumpable if it is sparse and both --sparse and --totals
|
||||||
|
+ are specified.
|
||||||
|
+ Otherwise, it is dumpable unless any of the following conditions occur:
|
||||||
|
+
|
||||||
|
a) it is empty *and* world-readable, or
|
||||||
|
b) current archive is /dev/null */
|
||||||
|
|
||||||
|
bool
|
||||||
|
file_dumpable_p (struct tar_stat_info *st)
|
||||||
|
{
|
||||||
|
- return !(dev_null_output
|
||||||
|
- || (st->archive_file_size == 0
|
||||||
|
- && (st->stat.st_mode & MODE_R) == MODE_R));
|
||||||
|
+ if (dev_null_output)
|
||||||
|
+ return totals_option && sparse_option && sparse_file_p (st);
|
||||||
|
+ return !(st->archive_file_size == 0
|
||||||
|
+ && (st->stat.st_mode & MODE_R) == MODE_R);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1437,7 +1441,7 @@
|
||||||
|
else
|
||||||
|
fd = -1;
|
||||||
|
|
||||||
|
- if (sparse_option && sparse_file_p (st))
|
||||||
|
+ if (fd != -1 && sparse_option && sparse_file_p (st))
|
||||||
|
{
|
||||||
|
status = sparse_dump_file (fd, st);
|
||||||
|
if (status == dump_status_not_implemented)
|
8
tar.spec
8
tar.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: A GNU file archiving program.
|
Summary: A GNU file archiving program.
|
||||||
Name: tar
|
Name: tar
|
||||||
Version: 1.15.1
|
Version: 1.15.1
|
||||||
Release: 7
|
Release: 8
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Applications/Archiving
|
Group: Applications/Archiving
|
||||||
URL: http://www.gnu.org/software/tar/
|
URL: http://www.gnu.org/software/tar/
|
||||||
@ -13,6 +13,7 @@ Patch8: tar-1.14-loneZeroWarning.patch
|
|||||||
Patch9: tar-1.15.1-makeCheck.patch
|
Patch9: tar-1.15.1-makeCheck.patch
|
||||||
Patch10: tar-1.15.1-gcc4.patch
|
Patch10: tar-1.15.1-gcc4.patch
|
||||||
Patch11: tar-1.15.1-lseek.patch
|
Patch11: tar-1.15.1-lseek.patch
|
||||||
|
Patch12: tar-1.15.1-sparseTotals.patch
|
||||||
Prereq: info
|
Prereq: info
|
||||||
BuildRequires: autoconf automake gzip
|
BuildRequires: autoconf automake gzip
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||||
@ -37,6 +38,7 @@ the rmt package.
|
|||||||
%patch9 -p1 -b .makeCheck
|
%patch9 -p1 -b .makeCheck
|
||||||
%patch10 -p1 -b .gcc4
|
%patch10 -p1 -b .gcc4
|
||||||
%patch11 -p1 -b .lseek
|
%patch11 -p1 -b .lseek
|
||||||
|
%patch12 -p1 -b .sparseTotals
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -107,6 +109,10 @@ fi
|
|||||||
%{_infodir}/tar.info*
|
%{_infodir}/tar.info*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 27 2005 Peter Vrabec <pvrabec@redhat.com> 1.15.1-8
|
||||||
|
- A file is dumpable if it is sparse and both --sparse
|
||||||
|
and --totals are specified (#154882)
|
||||||
|
|
||||||
* Tue Jul 26 2005 Peter Vrabec <pvrabec@redhat.com> 1.15.1-7
|
* Tue Jul 26 2005 Peter Vrabec <pvrabec@redhat.com> 1.15.1-7
|
||||||
- exclude listed02.at from testsuite
|
- exclude listed02.at from testsuite
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user