[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] gnu, guix: Add a gzip package which includes tests, and use
From: |
John Darrington |
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 |
* 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