rpms/tar/FC-4 tar-1.15.1-sparseTotals.patch, NONE, 1.1 tar.spec, 1.21, 1.22

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Jul 27 11:44:07 UTC 2005


Author: pvrabec

Update of /cvs/dist/rpms/tar/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv26948

Modified Files:
	tar.spec 
Added Files:
	tar-1.15.1-sparseTotals.patch 
Log Message:
- A file is dumpable if it is sparse and both --sparse
  and --totals are specified (#154882)
- exclude err.patch, it causes SEGV (#158743)



tar-1.15.1-sparseTotals.patch:
 create.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

--- NEW FILE tar-1.15.1-sparseTotals.patch ---
--- 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)


Index: tar.spec
===================================================================
RCS file: /cvs/dist/rpms/tar/FC-4/tar.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- tar.spec	15 Apr 2005 09:18:16 -0000	1.21
+++ tar.spec	27 Jul 2005 11:44:04 -0000	1.22
@@ -1,7 +1,7 @@
 Summary: A GNU file archiving program.
 Name: tar
 Version: 1.15.1
-Release: 5
+Release: 6.FC4
 License: GPL
 Group: Applications/Archiving
 URL: http://www.gnu.org/software/tar/
@@ -9,11 +9,12 @@
 Source1: ftp://ftp.gnu.org/pub/gnu/tar/tar-%{version}.tar.gz.sig
 Patch0: tar-1.13.18-manpage.patch
 Patch6: tar-1.14-nolibrt.patch
-Patch7: tar-1.14-err.patch
+#Patch7: tar-1.14-err.patch
 Patch8: tar-1.14-loneZeroWarning.patch
 Patch9: tar-1.15.1-makeCheck.patch
 Patch10: tar-1.15.1-gcc4.patch
 Patch11: tar-1.15.1-lseek.patch
+Patch12: tar-1.15.1-sparseTotals.patch
 Prereq: info
 BuildRequires: autoconf automake gzip
 Buildroot: %{_tmppath}/%{name}-%{version}-root
@@ -34,11 +35,12 @@
 %setup -q
 %patch0 -p1
 %patch6 -p1 -b .nolibrt
-%patch7 -p1 -b .err
+#%patch7 -p1 -b .err
 %patch8 -p1 -b .loneZeroWarning
 %patch9 -p1 -b .makeCheck
 %patch10 -p1 -b .gcc4
 %patch11 -p1 -b .lseek
+%patch12 -p1 -b .sparseTotals
 
 %build
 
@@ -109,6 +111,11 @@
 %{_infodir}/tar.info*
 
 %changelog
+* Wed Jul 27 2005 Peter Vrabec <pvrabec at redhat.com> 1.15.1-6.FC4
+- A file is dumpable if it is sparse and both --sparse
+  and --totals are specified (#154882)
+- exclude err.patch, it causes SEGV (#158743)
+
 * Fri Apr 15 2005 Peter Vrabec <pvrabec at redhat.com> 1.15.1-5
 - extract sparse files even if the output fd is not seekable.(#154882)
 - (sparse_scan_file): Bugfix. offset had incorrect type.




More information about the fedora-cvs-commits mailing list