rpms/tar/devel tar-1.22-shortreadbuffer.patch, NONE, 1.1 tar.spec, 1.80, 1.81

Ondrej Vasik ovasik at fedoraproject.org
Thu Jun 25 20:04:44 UTC 2009


Author: ovasik

Update of /cvs/extras/rpms/tar/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12303

Modified Files:
	tar.spec 
Added Files:
	tar-1.22-shortreadbuffer.patch 
Log Message:
Report record size only if the archive refers to a device(#487760)

tar-1.22-shortreadbuffer.patch:

--- NEW FILE tar-1.22-shortreadbuffer.patch ---
diff -urNp tar-1.22-orig/src/buffer.c tar-1.22/src/buffer.c
--- tar-1.22-orig/src/buffer.c	2009-03-05 08:04:13.000000000 +0100
+++ tar-1.22/src/buffer.c	2009-06-25 21:42:34.000000000 +0200
@@ -679,6 +679,19 @@ archive_read_error (void)
   return;
 }
 
+static bool
+archive_is_dev ()
+{
+ struct stat st;
+
+ if (fstat (archive, &st))
+ {
+ stat_diag (*archive_name_cursor);
+ return false;
+ }
+ return S_ISBLK (st.st_mode) || S_ISCHR (st.st_mode);
+}
+
 static void
 short_read (size_t status)
 {
@@ -690,7 +703,8 @@ short_read (size_t status)
 
   if (left && left % BLOCKSIZE == 0
       && verbose_option
-      && record_start_block == 0 && status != 0)
+      && record_start_block == 0 && status != 0
+      && archive_is_dev ())
     {
       unsigned long rsize = status / BLOCKSIZE;
       WARN ((0, 0,
diff -urNp tar-1.22-orig/tests/sparsemvp.at tar-1.22/tests/sparsemvp.at
--- tar-1.22-orig/tests/sparsemvp.at	2008-10-19 23:56:00.000000000 +0200
+++ tar-1.22/tests/sparsemvp.at	2009-06-25 21:55:43.000000000 +0200
@@ -56,7 +56,5 @@ Test archive
 sparsefile
 Compare archive
 ],
-[tar: Record size = 12 blocks
-tar: Record size = 12 blocks
-],[],[],[pax])])
+[],[],[],[pax])])
 
diff -urNp tar-1.22-orig/tests/volsize.at tar-1.22/tests/volsize.at
--- tar-1.22-orig/tests/volsize.at	2008-10-19 23:54:53.000000000 +0200
+++ tar-1.22/tests/volsize.at	2009-06-25 21:56:08.000000000 +0200
@@ -52,9 +52,7 @@ Extracted directory
 abc
 abc/CCC
 ],
-[tar: Record size = 5 blocks
-tar: Record size = 5 blocks
-])
+[])
 
 AT_CLEANUP
 


Index: tar.spec
===================================================================
RCS file: /cvs/extras/rpms/tar/devel/tar.spec,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -p -r1.80 -r1.81
--- tar.spec	15 May 2009 11:31:43 -0000	1.80
+++ tar.spec	25 Jun 2009 20:04:41 -0000	1.81
@@ -2,7 +2,7 @@ Summary: A GNU file archiving program
 Name: tar
 Epoch: 2
 Version: 1.22
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv3+
 Group: Applications/Archiving
 URL: http://www.gnu.org/software/tar/
@@ -15,6 +15,7 @@ Patch3: tar-1.19-xattrs.patch
 Patch4: tar-1.19-xattrs-conf.patch
 Patch5: tar-1.17-wildcards.patch
 Patch6: tar-1.22-atime-rofs.patch
+Patch7: tar-1.22-shortreadbuffer.patch
 Prereq: info
 BuildRequires: autoconf automake gzip texinfo gettext libacl-devel libselinux-devel gawk rsh
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -41,6 +42,7 @@ the rmt package.
 %patch4 -p1 -b .xattrs-conf
 %patch5 -p1 -b .wildcards
 %patch6 -p1 -b .rofs
+%patch7 -p1 -b .shortread
 
 %build
 %configure --bindir=/bin --libexecdir=/sbin
@@ -91,6 +93,10 @@ fi
 %{_infodir}/tar.info*
 
 %changelog
+* Thu Jun 25 2009 Ondrej Vasik <ovasik at redhat.com> 2:1.22-4
+- Report record size only if the archive refers to a device
+  (#487760)
+
 * Fri May 15 2009 Ondrej Vasik <ovasik at redhat.com> 2:1.22-3
 - ignore errors from setting utime() for source file
   on read-only filesystem (#500742)




More information about the fedora-extras-commits mailing list