summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-01-13 22:14:43 +0100
committerLudovic Courtès <ludo@gnu.org>2015-01-13 22:20:12 +0100
commit1c975f60b16dec86ea71dcb5aa1e222003f48aba (patch)
treefb9e2fd904265b822b6692ab8716ad5821839fba
parent7c594a2c2fe7ae34b64ae61ebda41645c0e1c52c (diff)
gnu: Add zerofree.
* gnu/packages/linux.scm (zerofree): New variable.
-rw-r--r--gnu/packages/linux.scm41
1 files changed, 40 insertions, 1 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7199cca521..eab6c54a65 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -544,7 +544,11 @@ slabtop, and skill.")
(substitute* (find-files "." "^Makefile.in$")
(("#!/bin/sh")
(string-append "#!" (which "sh")))))
- %standard-phases)
+ (alist-cons-after
+ 'install 'install-libs
+ (lambda _
+ (zero? (system* "make" "install-libs")))
+ %standard-phases))
;; FIXME: Tests work by comparing the stdout/stderr of programs, that
;; they fail because we get an extra line that says "Can't check if
@@ -591,6 +595,41 @@ from the e2fsprogs package. It is meant to be used in initrds.")
(home-page (package-home-page e2fsprogs))
(license (package-license e2fsprogs))))
+(define-public zerofree
+ (package
+ (name "zerofree")
+ (version "1.0.3")
+ (home-page "http://intgat.tigress.co.uk/rmy/uml/")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append home-page name "-" version
+ ".tgz"))
+ (sha256
+ (base32
+ "1xncw3dn2cp922ly42m96p6fh7jv8ysg6bwqbk5xvw701f3dmkrs"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (alist-replace
+ 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (copy-file "zerofree"
+ (string-append bin "/zerofree"))
+ (chmod (string-append bin "/zerofree")
+ #o555)
+ #t))
+ (alist-delete 'configure %standard-phases))
+ #:tests? #f)) ;no tests
+ (inputs `(("libext2fs" ,e2fsprogs)))
+ (synopsis "Zero non-allocated regions in ext2/ext3/ext4 file systems")
+ (description
+ "The zerofree command scans the free blocks in an ext2 file system and
+fills any non-zero blocks with zeroes. This is a useful way to make disk
+images more compressible.")
+ (license gpl2)))
+
(define-public strace
(package
(name "strace")