rpms/tar/F-11 tar-1.22-atime-rofs.patch, NONE, 1.1 tar-1.22-shortreadbuffer.patch, NONE, 1.1 tar.spec, 1.79, 1.80

Ondrej Vasik ovasik at fedoraproject.org
Thu Jul 2 06:25:57 UTC 2009


Author: ovasik

Update of /cvs/extras/rpms/tar/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23187

Modified Files:
	tar.spec 
Added Files:
	tar-1.22-atime-rofs.patch tar-1.22-shortreadbuffer.patch 
Log Message:
report record size only if the archive refers to a device(#487760), ignore errors from setting utime() for source file on read-only filesystem (#500742)

tar-1.22-atime-rofs.patch:

--- NEW FILE tar-1.22-atime-rofs.patch ---
diff -urNp tar-1.22-orig/src/create.c tar-1.22/src/create.c
--- tar-1.22-orig/src/create.c	2009-05-15 10:50:38.000000000 +0200
+++ tar-1.22/src/create.c	2009-05-15 10:51:52.000000000 +0200
@@ -1691,7 +1691,8 @@ dump_file0 (struct tar_stat_info *st, co
 		exit_status = TAREXIT_DIFFERS;
 	    }
 	  else if (atime_preserve_option == replace_atime_preserve
-		   && set_file_atime (fd, p, restore_times) != 0)
+		   && set_file_atime (fd, p, restore_times) != 0
+		   && errno != EROFS )
 	    utime_error (p);
 	}
 

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/F-11/tar.spec,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -p -r1.79 -r1.80
--- tar.spec	6 Mar 2009 12:26:56 -0000	1.79
+++ tar.spec	2 Jul 2009 06:25:27 -0000	1.80
@@ -2,7 +2,7 @@ Summary: A GNU file archiving program
 Name: tar
 Epoch: 2
 Version: 1.22
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv3+
 Group: Applications/Archiving
 URL: http://www.gnu.org/software/tar/
@@ -14,6 +14,8 @@ Patch2: tar-1.15.1-vfatTruncate.patch
 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)
@@ -39,6 +41,8 @@ the rmt package.
 %patch3 -p1 -b .xattrs
 %patch4 -p1 -b .xattrs-conf
 %patch5 -p1 -b .wildcards
+%patch6 -p1 -b .rofs
+%patch7 -p1 -b .shortread
 
 %build
 %configure --bindir=/bin --libexecdir=/sbin
@@ -89,6 +93,12 @@ fi
 %{_infodir}/tar.info*
 
 %changelog
+* Thu Jul 02 2009 Ondrej Vasik <ovasik at redhat.com> 2:1.22-3
+- report record size only if the archive refers to a device
+  (#487760)
+- ignore errors from setting utime() for source file
+  on read-only filesystem (#500742)
+
 * Fri Mar 06 2009 Kamil Dudka <kdudka at redhat.com> 2:1.22-2
 - improve tar-1.14-loneZeroWarning.patch (#487315)
 




More information about the fedora-extras-commits mailing list