unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: John Darrington <jmd@gnu.org>
To: guix-devel@gnu.org
Cc: John Darrington <jmd@gnu.org>
Subject: [PATCH 2/2] gnu, guix: Add a gzip package which includes tests, and use it where possible.
Date: Mon, 21 Jul 2014 14:46:26 +0200	[thread overview]
Message-ID: <1405946787-12021-2-git-send-email-jmd@gnu.org> (raw)
In-Reply-To: <1405946787-12021-1-git-send-email-jmd@gnu.org>

* gnu/packages/base.scm: Replace "gzip" with "untested-gzip".
* gnu/packages/bootstrap.scm: Replace "gzip" with "untested-gzip".
* gnu/packages/compression.scm: gzip -> untested-gzip. Add gzip.
* gnu/packages/make-bootstrap.scm: Replace "gzip" with "untested-gzip".
* guix/packages.scm: Replace "gzip" with "untested-gzip".
---
 gnu/packages/base.scm           |    2 +-
 gnu/packages/bootstrap.scm      |    2 +-
 gnu/packages/compression.scm    |   39 ++++++++++++++++++++++++++++++++++++---
 gnu/packages/make-bootstrap.scm |    2 +-
 guix/packages.scm               |    4 ++--
 5 files changed, 41 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 005e1c0..b0b016b 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1186,7 +1186,7 @@ store.")
               ((name package)
                (list name (finalize package))))
              `(("tar" ,tar)
-               ("gzip" ,gzip)
+               ("gzip" ,untested-gzip)
                ("bzip2" ,bzip2)
                ("xz" ,xz)
                ("diffutils" ,diffutils)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 981cde9..28bbdcd 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -69,7 +69,7 @@
     `(("tar"   ,%bootstrap-coreutils&co)
       ("xz"    ,%bootstrap-coreutils&co)
       ("bzip2" ,%bootstrap-coreutils&co)
-      ("gzip"  ,%bootstrap-coreutils&co)
+      ("untested-gzip"  ,%bootstrap-coreutils&co)
       ("patch" ,%bootstrap-coreutils&co)))
 
   (let ((orig-method (origin-method source)))
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 6887ba6..665e887 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -24,6 +24,8 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages less)
+  #:use-module (gnu packages util-linux)
   #:use-module (gnu packages which))
 
 (define-public zlib
@@ -71,6 +73,31 @@ independent of the input data and can be reduced, if necessary, at some cost
 in compression.")
     (license license:zlib)))
 
+;; A version of gzip which doesn't get tested.  Most users should not use
+;; this.  It is here for use early in the bootstrap process where a circular
+;; dependency would otherwise arise.
+(define-public untested-gzip
+  (package
+   (name "untested-gzip")
+   (version "1.6")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "mirror://gnu/gzip/gzip-"
+                                version ".tar.gz"))
+            (sha256
+             (base32
+              "0zlgdm4v3dndrbiz7b67mbbj25dpwqbmbzjiycssvrfrcfvq7swp"))))
+   (build-system gnu-build-system)
+   (synopsis "General file (de)compression (using lzw)")
+   (arguments '(#:tests? #f))
+   (description
+    "GNU Gzip provides data compression and decompression utilities; the
+typical extension is \".gz\".  Unlike the \"zip\" format, it compresses a single
+file; as a result, it is often used in conjunction with \"tar\", resulting in
+\".tar.gz\" or \".tgz\", etc.")
+   (license license:gpl3+)
+   (home-page "http://www.gnu.org/software/gzip/")))
+
 (define-public gzip
   (package
    (name "gzip")
@@ -83,10 +110,16 @@ in compression.")
              (base32
               "0zlgdm4v3dndrbiz7b67mbbj25dpwqbmbzjiycssvrfrcfvq7swp"))))
    (build-system gnu-build-system)
-   (synopsis "General file (de)compression (using lzw)")
    (arguments
-    ;; FIXME: The test suite wants `less', and optionally Perl.
-    '(#:tests? #f))
+    `(#:phases (alist-cons-before
+                'configure 'pref-conf
+                (lambda _
+                  (substitute* "Makefile.in"
+                    (("-e 's\\|/bin/sh\\|\\$\\(SHELL\\)\\|g'") "")))
+               %standard-phases)))
+  (synopsis "General file (de)compression (using lzw)")
+   (native-inputs `(("less" ,less)
+                    ("util-linux" ,util-linux)))
    (description
     "GNU Gzip provides data compression and decompression utilities; the
 typical extension is \".gz\".  Unlike the \"zip\" format, it compresses a single
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 2808beb..e224362 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -191,7 +191,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
               ((name package)
                (list name (finalize package))))
              `(("tar" ,tar)
-               ("gzip" ,gzip)
+               ("gzip" ,untested-gzip)
                ("bzip2" ,bzip2)
                ("xz" ,xz)
                ("patch" ,patch)
diff --git a/guix/packages.scm b/guix/packages.scm
index 985a573..0bf3cfa 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -284,7 +284,7 @@ corresponds to the arguments expected by `set-path-environment-variable'."
     `(("tar"   ,(ref '(gnu packages base) 'tar))
       ("xz"    ,(ref '(gnu packages compression) 'xz))
       ("bzip2" ,(ref '(gnu packages compression) 'bzip2))
-      ("gzip"  ,(ref '(gnu packages compression) 'gzip))
+      ("untested-gzip"  ,(ref '(gnu packages compression) 'untested-gzip))
       ("lzip"  ,(ref '(gnu packages compression) 'lzip))
       ("patch" ,(ref '(gnu packages base) 'patch)))))
 
@@ -314,7 +314,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
         source))
 
   (define decompression-type
-    (cond ((string-suffix? "gz" source-file-name)  "gzip")
+    (cond ((string-suffix? "gz" source-file-name)  "untested-gzip")
           ((string-suffix? "bz2" source-file-name) "bzip2")
           ((string-suffix? "lz" source-file-name)  "lzip")
           (else "xz")))
-- 
1.7.10.4

  reply	other threads:[~2014-07-21 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21 12:46 [PATCH 1/2] gnu: Move package util-linux into its own module John Darrington
2014-07-21 12:46 ` John Darrington [this message]
2014-07-21 16:17   ` [PATCH 2/2] gnu, guix: Add a gzip package which includes tests, and use it where possible Ludovic Courtès
2014-07-21 16:26     ` John Darrington

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1405946787-12021-2-git-send-email-jmd@gnu.org \
    --to=jmd@gnu.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).