[arch-commits] Commit in libarchive/trunk (PKGBUILD skip-fiemap-on-unavail.patch)

Dave Reisner dreisner at archlinux.org
Sat Feb 25 01:41:33 UTC 2012


    Date: Friday, February 24, 2012 @ 20:41:32
  Author: dreisner
Revision: 151122

upgpkg: libarchive 3.0.3-4

- backport fix for reiserfs FIEMAP bug

Added:
  libarchive/trunk/skip-fiemap-on-unavail.patch
Modified:
  libarchive/trunk/PKGBUILD

------------------------------+
 PKGBUILD                     |   14 ++++++++++----
 skip-fiemap-on-unavail.patch |   41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-02-25 01:28:55 UTC (rev 151121)
+++ PKGBUILD	2012-02-25 01:41:32 UTC (rev 151122)
@@ -3,7 +3,7 @@
 
 pkgname=libarchive
 pkgver=3.0.3
-pkgrel=3
+pkgrel=4
 pkgdesc="library that can create and read several streaming archive formats"
 arch=('i686' 'x86_64')
 url="http://libarchive.googlecode.com/"
@@ -12,13 +12,16 @@
 depends=('zlib' 'bzip2' 'xz>=5.0.0' 'acl' 'openssl>=1.0.0' 'expat')
 source=("http://libarchive.googlecode.com/files/libarchive-${pkgver}.tar.gz"
         'interpret-non-posix-zips.patch'
-        'test-with-zip-mtime.patch')
+        'test-with-zip-mtime.patch'
+        'skip-fiemap-on-unavail.patch')
 md5sums=('ca4090f0099432a9ac5a8b6618dc3892'
          'f02b88eb10877c7a7d527ed89c662e44'
-         '8366def6d7d70d424fa28a986c78c015')
+         '8366def6d7d70d424fa28a986c78c015'
+         'efa7cbda9fc64a4f1392324d0b5707e2')
 sha256sums=('c5fc7620f74a54b1717e4aed38aee85dc27a988ad1db7640f28eb63a82ea62d7'
             '9d8240a360d61464dfc5a98342f520ad41b0f922261f2ace7ec1fefb8c289bdc'
-            'b7a8be5c1e3220960a9f67c9779b10d2663e25d72939546b4f01a49f1ee3a61f')
+            'b7a8be5c1e3220960a9f67c9779b10d2663e25d72939546b4f01a49f1ee3a61f'
+            '05696eb87bf60520aff3a9d6afb4e40273ecca25e0a01a6d5a3669642f07b444')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"
@@ -29,6 +32,9 @@
   # http://code.google.com/p/libarchive/issues/detail?id=231
   patch -Np0 <"$srcdir/test-with-zip-mtime.patch"
 
+  # http://code.google.com/p/libarchive/issues/detail?id=238
+  patch -Np1 <"$srcdir/skip-fiemap-on-unavail.patch"
+
   ./configure --prefix=/usr --without-xml2
   make
 }

Added: skip-fiemap-on-unavail.patch
===================================================================
--- skip-fiemap-on-unavail.patch	                        (rev 0)
+++ skip-fiemap-on-unavail.patch	2012-02-25 01:41:32 UTC (rev 151122)
@@ -0,0 +1,41 @@
+From 293687358e2c52213a3f077bb3d8f860ea5bfda9 Mon Sep 17 00:00:00 2001
+From: Michihiro NAKAJIMA <ggcueroad at gmail.com>
+Date: Mon, 6 Feb 2012 04:51:16 +0900
+Subject: [PATCH] Fix issue 238. Skip the setup sparse on linux without a
+ check of errno if ioctl(,FS_IOC_FIEMAP,) failed because the
+ errno is not fixed , for example, some file system returns
+ ENOTTY, another returns EOPNOTSUPP, or EINVAL and so on. We
+ cannot decide what errno exactly indicates an unsupported
+ error.
+
+---
+ libarchive/archive_read_disk_entry_from_file.c |   13 +++----------
+ 1 file changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c
+index eef42ef74..6415008 100644
+--- a/libarchive/archive_read_disk_entry_from_file.c
++++ b/libarchive/archive_read_disk_entry_from_file.c
+@@ -859,16 +859,9 @@ setup_sparse(struct archive_read_disk *a,
+ 
+ 		r = ioctl(fd, FS_IOC_FIEMAP, fm); 
+ 		if (r < 0) {
+-			/* When errno is ENOTTY, it is better we should
+-			 * return ARCHIVE_OK because an earlier version
+-			 *(<2.6.28) cannot perfom FS_IOC_FIEMAP.
+-			 * We should also check if errno is EOPNOTSUPP,
+-			 * it means "Operation not supported". */
+-			if (errno != ENOTTY && errno != EOPNOTSUPP) {
+-				archive_set_error(&a->archive, errno,
+-				    "FIEMAP failed");
+-				exit_sts = ARCHIVE_FAILED;
+-			}
++			/* When something error happens, it is better we
++			 * should return ARCHIVE_OK because an earlier
++			 * version(<2.6.28) cannot perfom FS_IOC_FIEMAP. */
+ 			goto exit_setup_sparse;
+ 		}
+ 		if (fm->fm_mapped_extents == 0)
+-- 
+1.7.9.2
+




More information about the arch-commits mailing list