diff options
author | Pierre Neidhardt <mail@ambrevar.xyz> | 2019-08-18 15:48:16 +0200 |
---|---|---|
committer | Pierre Neidhardt <mail@ambrevar.xyz> | 2019-08-18 15:48:50 +0200 |
commit | 49b28a740bcdb906245b1405f7dc91efeee621a3 (patch) | |
tree | 0867a44ed74bf2c49553ed94ca28dc25d63c1ba6 /gnu | |
parent | 0fc235a0236f182439340519b2b98f14b5e2ac3d (diff) | |
download | patches-49b28a740bcdb906245b1405f7dc91efeee621a3.tar patches-49b28a740bcdb906245b1405f7dc91efeee621a3.tar.gz |
gnu: Add compsize.
* gnu/packages/linux.scm (compsize): New variable.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/linux.scm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 99087638f6..e2acccafcd 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3928,6 +3928,49 @@ repair and easy administration.") from the btrfs-progs package. It is meant to be used in initrds.") (license (package-license btrfs-progs)))) +(define-public compsize + (package + (name "compsize") + (version "1.3") + (home-page "https://github.com/kilobyte/compsize") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (sha256 + (base32 "1c69whla844nwis30jxbj00zkpiw3ccndhkmzjii8av5358mjn43")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (inputs + `(("btrfs-progs" ,btrfs-progs))) + (arguments + `(#:tests? #f ; No tests. + #:make-flags (list "CC=gcc") + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (install-file "compsize" (string-append out "/bin")) + (install-file "compsize.8" (string-append out "/share/man/man8")))))))) + (synopsis "Find compression type/ratio on Btrfs files") + (description "@command{compsize} takes a list of files (given as +arguments) on a Btrfs file system and measures used compression types and +effective compression ratio, producing a report. + +A directory has no extents but has a (recursive) list of files. A non-regular +file is silently ignored. + +As it makes no sense to talk about compression ratio of a partial extent, +every referenced extent is counted whole, exactly once -- no matter if you use +only a few bytes of a 1GB extent or reflink it a thousand times. Thus, the +uncompressed size will not match the number given by @command{tar} or +@command{du}. On the other hand, the space used should be accurate (although +obviously it can be shared with files outside our set).") + (license license:gpl2+))) + (define-public f2fs-tools-1.7 (package (name "f2fs-tools") |