From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: [PATCH 2/4] gnu: Add libarchive. Date: Thu, 29 May 2014 16:39:09 -0500 Message-ID: <87iooop8n6.fsf@member.fsf.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wq7z3-0005ha-SH for Guix-devel@gnu.org; Thu, 29 May 2014 17:35:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wq7yz-0003jF-S0 for Guix-devel@gnu.org; Thu, 29 May 2014 17:35:33 -0400 Received: from mail-ig0-x22b.google.com ([2607:f8b0:4001:c05::22b]:61769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wq7yz-0003jB-NE for Guix-devel@gnu.org; Thu, 29 May 2014 17:35:29 -0400 Received: by mail-ig0-f171.google.com with SMTP id c1so58469igq.4 for ; Thu, 29 May 2014 14:35:29 -0700 (PDT) Received: from cooper.gmail.com (chippewa-nat.cray.com. [136.162.34.1]) by mx.google.com with ESMTPSA id l5sm325307igt.0.2014.05.29.14.35.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 29 May 2014 14:35:28 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel@gnu.org --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0002-gnu-Add-libarchive.patch Content-Transfer-Encoding: 8bit >From 27002e7928daec6192bc683863ed21736309af22 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Thu, 29 May 2014 16:35:45 -0500 Subject: [PATCH 2/4] gnu: Add libarchive. * gnu/packages/compression.scm (libarchive): New variable. --- gnu/packages/compression.scm | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index c832807..31b0430 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013 Ludovic Courtès ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2014 Mark H Weaver +;;; Copyright © 2014 Eric Bavier ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,8 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (gnu packages nettle) + #:use-module (gnu packages xml) #:use-module (gnu packages which)) (define-public zlib @@ -315,3 +318,57 @@ archives that can be readily emailed. A shell archive is a file that can be processed by a Bourne-type shell to unpack the original collection of files. This package is mostly for compatibility and historical interest.") (license license:gpl3+))) + +(define-public libarchive + (package + (name "libarchive") + (version "3.1.2") + (source + (origin + (method url-fetch) + (uri (string-append "http://libarchive.org/downloads/libarchive-" + version ".tar.gz")) + (sha256 + (base32 + "0pixqnrcf35dnqgv0lp7qlcw7k13620qkhgxr288v7p4iz6ym1zb")))) + (build-system gnu-build-system) + (inputs + `(("zlib" ,zlib) + ("nettle" ,nettle) + ("lzo" ,lzo) + ("bzip2" ,bzip2) + ("libxml2" ,libxml2) + ("xz" ,xz))) + (arguments + `(#:phases + (alist-cons-before + 'build 'patch-pwd + (lambda _ + (substitute* "Makefile" + (("/bin/pwd") (which "pwd")))) + (alist-replace + 'check + (lambda _ + ;; XXX: The test_owner_parse, test_read_disk, and + ;; test_write_disk_lookup tests expect user 'root' to exist, but + ;; the chroot's /etc/passwd doesn't have it. Turn off those tests. + ;; + ;; The tests allow one to disable tests matching a globbing pattern. + (and (zero? (system* "make" + "libarchive_test" "bsdcpio_test" "bsdtar_test")) + ;; XXX: This glob disables too much. + (zero? (system* "./libarchive_test" "^test_*_disk*")) + (zero? (system* "./bsdcpio_test" "^test_owner_parse")) + (zero? (system* "./bsdtar_test")))) + %standard-phases)))) + (home-page "http://libarchive.org/") + (synopsis "Multi-format archive and compression library") + (description + "Libarchive provides a flexible interface for reading and writing +archives in various formats such as tar and cpio. Libarchive also supports +reading and writing archives compressed using various compression filters such +as gzip and bzip2. The library is inherently stream-oriented; readers +serially iterate through the archive, writers serially add things to the +archive. In particular, note that there is currently no built-in support for +random access nor for in-place modification.") + (license license:bsd-2))) -- 1.7.9.5 --=-=-= -- Eric Bavier --=-=-=--