mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
pack: Use maximum compression; use '-n' for gzip.
* guix/scripts/pack.scm (<compressor>)[tar-option]: Remove. [command]: New field. (%compressors): Provide complete commands. Use '-9' or equivalent for each compressor; use '-n' for gzip. (self-contained-tarball)[build]: Adjust accordingly.
This commit is contained in:
parent
796d2f2d0b
commit
36f213fb70
1 changed files with 8 additions and 8 deletions
|
@ -43,20 +43,19 @@ (define-module (guix scripts pack)
|
||||||
|
|
||||||
;; Type of a compression tool.
|
;; Type of a compression tool.
|
||||||
(define-record-type <compressor>
|
(define-record-type <compressor>
|
||||||
(compressor name package extension tar-option)
|
(compressor name package extension command)
|
||||||
compressor?
|
compressor?
|
||||||
(name compressor-name) ;string (e.g., "gzip")
|
(name compressor-name) ;string (e.g., "gzip")
|
||||||
(package compressor-package) ;package
|
(package compressor-package) ;package
|
||||||
(extension compressor-extension) ;string (e.g., "lz")
|
(extension compressor-extension) ;string (e.g., "lz")
|
||||||
(tar-option compressor-tar-option)) ;string (e.g., "--lzip")
|
(command compressor-command)) ;list (e.g., '("gzip" "-9n"))
|
||||||
|
|
||||||
(define %compressors
|
(define %compressors
|
||||||
;; Available compression tools.
|
;; Available compression tools.
|
||||||
;; FIXME: Use '--no-name' for gzip.
|
(list (compressor "gzip" gzip "gz" '("gzip" "-9n"))
|
||||||
(list (compressor "gzip" gzip "gz" "--gzip")
|
(compressor "lzip" lzip "lz" '("lzip" "-9"))
|
||||||
(compressor "lzip" lzip "lz" "--lzip")
|
(compressor "xz" xz "xz" '("xz" "-e"))
|
||||||
(compressor "xz" xz "xz" "--xz")
|
(compressor "bzip2" bzip2 "bz2" '("bzip2" "-9"))))
|
||||||
(compressor "bzip2" bzip2 "bz2" "--bzip2")))
|
|
||||||
|
|
||||||
(define (lookup-compressor name)
|
(define (lookup-compressor name)
|
||||||
"Return the compressor object called NAME. Error out if it could not be
|
"Return the compressor object called NAME. Error out if it could not be
|
||||||
|
@ -130,7 +129,8 @@ (define directives
|
||||||
;; length limitation.
|
;; length limitation.
|
||||||
(with-directory-excursion %root
|
(with-directory-excursion %root
|
||||||
(exit
|
(exit
|
||||||
(zero? (apply system* "tar" #$(compressor-tar-option compressor)
|
(zero? (apply system* "tar"
|
||||||
|
"-I" #$(string-join (compressor-command compressor))
|
||||||
"--format=gnu"
|
"--format=gnu"
|
||||||
|
|
||||||
;; Avoid non-determinism in the archive. Use
|
;; Avoid non-determinism in the archive. Use
|
||||||
|
|
Loading…
Reference in a new issue