From 13a64b2c7ccadd7458f9cdac0a81046fda71b97baafd1de93a92a56f3308d792 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 23 Aug 2012 08:36:59 +0000 Subject: [PATCH] Accepting request 131394 from home:k0da:ppc - fix http://code.google.com/p/libarchive/issues/detail?id=277 test_option_b and test_option_nodump are failing on ppc64 OBS-URL: https://build.opensuse.org/request/show/131394 OBS-URL: https://build.opensuse.org/package/show/Archiving/libarchive?expand=0&rev=17 --- libarchive-ppc64.patch | 26 ++++++++++++++++++++++++++ libarchive.changes | 6 ++++++ libarchive.spec | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 libarchive-ppc64.patch diff --git a/libarchive-ppc64.patch b/libarchive-ppc64.patch new file mode 100644 index 0000000..fe811d8 --- /dev/null +++ b/libarchive-ppc64.patch @@ -0,0 +1,26 @@ +Index: libarchive-3.0.4/libarchive/archive_read_disk_entry_from_file.c +=================================================================== +--- libarchive-3.0.4.orig/libarchive/archive_read_disk_entry_from_file.c ++++ libarchive-3.0.4/libarchive/archive_read_disk_entry_from_file.c +@@ -197,7 +197,7 @@ archive_read_disk_entry_from_file(struct + fd = open(path, O_RDONLY | O_NONBLOCK); + } + if (fd >= 0) { +- unsigned long stflags; ++ int stflags; + r = ioctl(fd, EXT2_IOC_GETFLAGS, &stflags); + if (r == 0 && stflags != 0) + archive_entry_set_fflags(entry, stflags, 0); +Index: libarchive-3.0.4/libarchive/archive_read_disk_posix.c +=================================================================== +--- libarchive-3.0.4.orig/libarchive/archive_read_disk_posix.c ++++ libarchive-3.0.4/libarchive/archive_read_disk_posix.c +@@ -984,7 +984,7 @@ next_entry(struct archive_read_disk *a, + #elif defined(EXT2_IOC_GETFLAGS) && defined(EXT2_NODUMP_FL) &&\ + defined(HAVE_WORKING_EXT2_IOC_GETFLAGS) + if (S_ISREG(st->st_mode) || S_ISDIR(st->st_mode)) { +- unsigned long stflags; ++ int stflags; + + t->entry_fd = open_on_current_dir(t, + tree_current_access_path(t), O_RDONLY | O_NONBLOCK); diff --git a/libarchive.changes b/libarchive.changes index 10c9b9a..f291ca6 100644 --- a/libarchive.changes +++ b/libarchive.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 23 08:30:05 UTC 2012 - dvaleev@suse.com + +- fix http://code.google.com/p/libarchive/issues/detail?id=277 + test_option_b and test_option_nodump are failing on ppc64 + ------------------------------------------------------------------- Thu Aug 9 09:05:01 UTC 2012 - cfarrell@suse.com diff --git a/libarchive.spec b/libarchive.spec index 72ef874..07a08b2 100644 --- a/libarchive.spec +++ b/libarchive.spec @@ -36,6 +36,8 @@ Source0: http://libarchive.googlecode.com/files/libarchive-%{version}.tar Source1: baselibs.conf # PATCH-FIX-UPSTREAM libarchive-fix-checks.patch dimstar@opensuse.org -- Fix GCC 4.7 side effects. Taken from upstream. Patch0: libarchive-fix-checks.patch +# PATCH-FIX-UPSTREAM libarchive-ppc64.patch dvaleev@suse.com -- fix tests failing on ppc64 +Patch1: libarchive-ppc64.patch %description Libarchive is a programming library that can create and read several @@ -134,6 +136,7 @@ This package contains the development files. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %global optflags %{optflags} -D_REENTRANT -pipe