diff mbox

gnu: libarchive: fix issue 696 in v.3.2.1

Message ID 7tshrsd2jw.fsf@gmail.com
State New
Headers show

Commit Message

Carlos Sánchez de La Lama Oct. 19, 2016, 11:02 a.m. UTC
Pull request #807 has been made upstream, this fixes Issue 696 on GUIX side
until a new it is fixed on a libarchive release.

* gnu/packages/patches/libarchive-issue-696.patch: New file.
* gnu/local.mk: Register patch.
* gnu/packages/backup.scm (libarchive): Add patch.
(libarchive/fixed): Inherit patches from libarchive.
---
 gnu/local.mk                                    |  1 +
 gnu/packages/backup.scm                         | 15 +++++---
 gnu/packages/patches/libarchive-issue-696.patch | 51 +++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 6 deletions(-)
 create mode 100644 gnu/packages/patches/libarchive-issue-696.patch

Comments

Leo Famulari Oct. 19, 2016, 5:16 p.m. UTC | #1
On Wed, Oct 19, 2016 at 01:02:43PM +0200, Carlos Sánchez de La Lama wrote:
> Pull request #807 has been made upstream, this fixes Issue 696 on GUIX side
> until a new it is fixed on a libarchive release.
> 
> * gnu/packages/patches/libarchive-issue-696.patch: New file.
> * gnu/local.mk: Register patch.
> * gnu/packages/backup.scm (libarchive): Add patch.
> (libarchive/fixed): Inherit patches from libarchive.

Thanks! Let's wait to see what the libarchive developers say before we
apply it to our package.
diff mbox

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 5226b49..c887d0f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -619,6 +619,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/libarchive-7zip-heap-overflow.patch	\
   %D%/packages/patches/libarchive-fix-symlink-check.patch	\
   %D%/packages/patches/libarchive-fix-filesystem-attacks.patch	\
+  %D%/packages/patches/libarchive-issue-696.patch		\
   %D%/packages/patches/libarchive-safe_fprintf-buffer-overflow.patch	\
   %D%/packages/patches/libbonobo-activation-test-race.patch	\
   %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 797c06e..9f4d36b 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -181,7 +181,8 @@  backups (called chunks) to allow easy burning to CD/DVD.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "1lngng84k1kkljl74q0cdqc3s82vn2kimfm02dgm4d6m7x71mvkj"))))
+         "1lngng84k1kkljl74q0cdqc3s82vn2kimfm02dgm4d6m7x71mvkj"))
+       (patches (search-patches "libarchive-issue-696.patch"))))
     (build-system gnu-build-system)
     ;; TODO: Add -L/path/to/nettle in libarchive.pc.
     (inputs
@@ -233,11 +234,13 @@  random access nor for in-place modification.")
     (inherit libarchive)
     (source (origin
               (inherit (package-source libarchive))
-              (patches (search-patches
-                         "libarchive-7zip-heap-overflow.patch"
-                         "libarchive-fix-symlink-check.patch"
-                         "libarchive-fix-filesystem-attacks.patch"
-                         "libarchive-safe_fprintf-buffer-overflow.patch"))))))
+              (patches (append
+			(origin-patches (package-source libarchive))
+			(search-patches
+			 "libarchive-7zip-heap-overflow.patch"
+			 "libarchive-fix-symlink-check.patch"
+			 "libarchive-fix-filesystem-attacks.patch"
+			 "libarchive-safe_fprintf-buffer-overflow.patch")))))))
 
 (define-public rdup
   (package
diff --git a/gnu/packages/patches/libarchive-issue-696.patch b/gnu/packages/patches/libarchive-issue-696.patch
new file mode 100644
index 0000000..0fafacf
--- /dev/null
+++ b/gnu/packages/patches/libarchive-issue-696.patch
@@ -0,0 +1,51 @@ 
+From ba1665ee3d1c593c5baf9264cd5c5250eb0c515f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20de=20La=20Lama?=
+ <csanchezdll@gmail.com>
+Date: Wed, 19 Oct 2016 09:12:18 +0200
+Subject: [PATCH] Issue 696: ppc64le mache ckech failure
+
+This issue is not ppc64le specific. I have experienced on my
+4.4.22-gnu #1 SMP 1 i686 GNU/Linux. Might be dependant on kernel
+version and/or machine load. POSIX says errors after posix_spawnp
+returns can be signaled by child exitting with an 127 exit code.
+---
+ cpio/test/test_option_lz4.c | 7 +++++++
+ tar/test/test_option_lz4.c  | 7 +++++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/cpio/test/test_option_lz4.c b/cpio/test/test_option_lz4.c
+index d430ac7..afd683d 100644
+--- a/cpio/test/test_option_lz4.c
++++ b/cpio/test/test_option_lz4.c
+@@ -63,6 +63,13 @@ DEFINE_TEST(test_option_lz4)
+ 			    "but no such program is available on this system.");
+ 			return;
+ 		}
++		/* On some systems the error won't be detected until closing
++		   time, by a 127 exit error returned by waitpid. */
++		if (strstr(p, "Error closing") != NULL && !canLz4()) {
++			skipping("This version of bsdcpio uses an external lz4 program "
++			    "but no such program is available on this system.");
++			return;
++		}
+ 		failure("--lz4 option is broken: %s", p);
+ 		assertEqualInt(r, 0);
+ 		return;
+diff --git a/tar/test/test_option_lz4.c b/tar/test/test_option_lz4.c
+index 5dc9452..01ca6bb 100644
+--- a/tar/test/test_option_lz4.c
++++ b/tar/test/test_option_lz4.c
+@@ -63,6 +63,13 @@ DEFINE_TEST(test_option_lz4)
+ 			    "but no such program is available on this system.");
+ 			return;
+ 		}
++		/* On some systems the error won't be detected until closing
++		   time, by a 127 exit error returned by waitpid. */
++		if (strstr(p, "Error closing") != NULL && !canLz4()) {
++			skipping("This version of bsdcpio uses an external lz4 program "
++			    "but no such program is available on this system.");
++			return;
++		}
+ 		failure("--lz4 option is broken: %s", p);
+ 		assertEqualInt(r, 0);
+ 		return;