gnu: gpart: Fix typo in description.
[jackhill/guix/guix.git] / gnu / packages / disk.scm
index c4f128d..bf0897b 100644 (file)
@@ -2,8 +2,8 @@
 ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2015 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2016, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
@@ -18,6 +18,7 @@
 ;;; Copyright © 2020 Pkill -9 <pkill9@runbox.com>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
+;;; Copyright © 2021 Michael Rohleder <mike@rohleder.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix packages)
   #:use-module (guix utils))
 
+(define-public bcache-tools
+  ;; The 1.1 release is a year old and missing new features & documentation.
+  (let ((commit "096d205a9f1be8540cbc5a468c0da8203023de70")
+        (revision "0"))
+    (package
+      (name "bcache-tools")
+      (version (git-version "1.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url (string-append "https://git.kernel.org/pub/scm/"
+                                   "linux/kernel/git/colyli/bcache-tools.git"))
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0r0vwg4vacz5zgsafk360xn7gi2scy01c79mkmjrdyxjfij5z3iy"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f                    ; no test suite
+         #:make-flags
+         (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+               (string-append "UDEVLIBDIR=" (assoc-ref %outputs "out")
+                              "/lib/udev")
+               (string-append "DRACUTLIBDIR=" (assoc-ref %outputs "out")
+                              "/lib/dracut")
+               (string-append "CC=" ,(cc-for-target)))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)          ; no configure script
+           (add-before 'install 'fix-hard-coded-file-names
+             (lambda _
+               ;; Some rules still hard-code /usr.
+               (substitute* "Makefile"
+                 (("/usr") "${PREFIX}"))
+               #t))
+           (add-before 'install 'create-target-directories
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out")))
+                 (for-each (lambda (dir)
+                             (mkdir-p (string-append out dir)))
+                           (list "/lib/udev/rules.d"
+                                 "/sbin"
+                                 "/share/man/man8"))
+                 #t))))))
+      (native-inputs
+       `(("pkg-config" ,pkg-config)))
+      (inputs
+       `(("util-linux:lib" ,util-linux "lib"))) ; libblkid
+      (home-page "https://bcache.evilpiepirate.org")
+      (synopsis "Tools for the Linux kernel block layer cache")
+      (description
+       "This package contains user-space utilities to create and inspect bcache
+partitions.  It's rather minimal as bcache is designed to work well without
+configuration on any system.
+
+Linux's @acronym{bcache, block layer cache} lets one or more fast block devices,
+such as flash-based @acronym{SSDs, solid state drives}, to act as a cache for
+one or more slower (and inexpensive) devices, such as hard disk drives or
+redundant storage arrays.  In fact, bcache intends to be a superior alternative
+to battery-backed RAID controllers.
+
+Bcache is designed around the performance characteristics of SSDs and tries to
+minimize write inflation.  It's file-system agnostic and does both write-through
+and write-back caching.")
+      (license license:gpl2))))
+
 (define-public udevil
   (package
     (name "udevil")
@@ -156,14 +224,14 @@ tmpfs/ramfs filesystems.")
 (define-public parted
   (package
     (name "parted")
-    (version "3.3")
+    (version "3.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/parted/parted-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "0i1xp367wpqw75b20c3jnism3dg3yqj4a7a22p2jb1h1hyyv9qjp"))))
+                "0hjkv84x1bs2qqyx1fnzjqyyqrhv7kpdbq9bgydmi99d8wi80ag1"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -185,7 +253,7 @@ tmpfs/ramfs filesystems.")
        ;; For the tests.
        ("e2fsprogs" ,e2fsprogs)
        ("perl" ,perl)
-       ("python" ,python-2)
+       ("python-wrapper" ,python-wrapper)
        ("util-linux" ,util-linux)))
     (home-page "https://www.gnu.org/software/parted/")
     (synopsis "Disk partition editor")
@@ -234,17 +302,69 @@ fdisk.  fdisk is used for the creation and manipulation of disk partition
 tables, and it understands a variety of different formats.")
     (license license:gpl3+)))
 
+(define-public gpart
+  ;; The latest (0.3) release is from 2015 and is missing a crash fix.
+  (let ((commit "ec03350a01ad69708b5a3e2d47b8e002b0eba6c9")
+        (revision "0"))
+    (package
+      (name "gpart")
+      (version (git-version "0.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/baruch/gpart")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1dassswliaiwhhmx7yz540yyxgk53fvg672dbvgc5q0v6cqrh5jx"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:configure-flags
+         (list (string-append "--docdir=" (assoc-ref %outputs "out") "/share/doc/"
+                              ,name "-" ,version))
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'skip-premature-configuration
+             (lambda _
+               (substitute* "autogen.sh"
+                 (("\\./configure") "")))))))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)))
+      (home-page "https://github.com/baruch/gpart")
+      (synopsis "Guess and recover PC-style partition tables")
+      (description
+       "Gpart tries to guess the partitions on a PC-style, MBR-partitioned disk
+after they have been inadvertently deleted or the primary partition table at
+sector 0 damaged.  In both cases, the contents of these partitions still exist
+on the disk but the operating system cannot access them.
+
+Gpart ignores the partition table and scans each sector of the device or image
+file for several known file system and partition types.  Only partitions which
+have been formatted in some way can be recognized.  Several file system guessing
+modules are built in; more can be written and loaded at run time.
+
+The guessed table can be restored manually, for example with @command{fdisk},
+written to a file, or---if you firmly believe it's entirely correct---directly
+to disk.
+
+It should be stressed that gpart does a very heuristic job.  It can easily be
+right in its guesswork but it can also be terribly wrong.  Never believe its
+output without any plausibility checks.")
+      (license license:gpl2+))))
+
 (define-public gptfdisk
   (package
     (name "gptfdisk")
-    (version "1.0.5")
+    (version "1.0.7")
     (source
      (origin
       (method url-fetch)
       (uri (string-append "mirror://sourceforge/gptfdisk/gptfdisk/"
                           version "/gptfdisk-" version ".tar.gz"))
       (sha256
-       (base32 "0bybgp30pqxb6x5krxazkq4drca0gz4inxj89fpyr204rn3kjz8f"))))
+       (base32 "1h1871gwlq05gdc2wym98ghfmq6pn5lh8g5cqy3r49svz2vh8h3m"))))
     (build-system gnu-build-system)
     (inputs
      `(("gettext" ,gettext-minimal)
@@ -295,6 +415,8 @@ scheme.")
       (sha256
        (base32 "0qqh38izl5ppap9a5izf3hijh94k65s3zbfkczd4b7x04syqwlyf"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags (list (string-append "CXX=" ,(cxx-for-target)))))
     (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
     (synopsis "Data recovery utility")
     (native-inputs `(("lzip" ,lzip)))
@@ -308,23 +430,26 @@ to recover data more efficiently by only reading the necessary blocks.")
 (define-public dosfstools
   (package
     (name "dosfstools")
-    (version "4.1")
+    (version "4.2")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/" name "/" name
-                           "/releases/download/v" version "/"
-                           name "-" version ".tar.xz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dosfstools/dosfstools")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6"))))
+        (base32 "1xygsixmmc9l7drxylggnzkqqiks8zmlsbhg3z723ii2ak94236s"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags (list "--enable-compat-symlinks")
        #:make-flags (list (string-append "PREFIX=" %output)
                           "CC=gcc")))
     (native-inputs
-     `(("xxd" ,xxd))) ; for tests
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ;; For tests.
+       ("xxd" ,xxd)))
     (home-page "https://github.com/dosfstools/dosfstools")
     (synopsis "Utilities for making and checking MS-DOS FAT file systems")
     (description
@@ -426,14 +551,14 @@ and can dramatically shorten the lifespan of the drive if left unchecked.")
 (define-public gparted
   (package
     (name "gparted")
-    (version "1.1.0")
+    (version "1.2.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
                            version "/gparted-" version ".tar.gz"))
        (sha256
-        (base32 "092rgwjh1825fal6v3yafq2wr0i61hh0a2n0j4296zn0zdx7pzp2"))))
+        (base32 "06f72hqx5jf2irzsmi7lgpxxj38ncixh0acb4307wyjd4mfp343c"))))
     (build-system glib-or-gtk-build-system)
     (arguments
       ;; Tests require access to paths outside the build container, such
@@ -692,7 +817,7 @@ passphrases.")
 (define-public ndctl
   (package
     (name "ndctl")
-    (version "71")
+    (version "71.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -701,7 +826,7 @@ passphrases.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "14vhldncflxgsam49ssn1x3h4m9xxw9dwyl748xajf1js33ph5av"))))
+                "1vi61bm9wyawklswh9mj9zdp28ar7r97qckwnhgiyila73fb3jx2"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("asciidoc" ,asciidoc)
@@ -793,7 +918,7 @@ to create devices with respective mappings for the ATARAID sets discovered.")
 (define-public libblockdev
   (package
     (name "libblockdev")
-    (version "2.24")
+    (version "2.25")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/storaged-project/"
@@ -801,7 +926,7 @@ to create devices with respective mappings for the ATARAID sets discovered.")
                                   version "-1/libblockdev-" version ".tar.gz"))
               (sha256
                (base32
-                "0wq7624pnprvfzrf39bq1cybd9lqwawbdg5bm0cchlpgvdq7q86w"))))
+                "0s0nazkpzpn4an00qghjkk9n7gdm5a8dqfr5hfnlk5mk5lma8njm"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -1048,7 +1173,7 @@ that support this feature).")
 (define-public memkind
   (package
     (name "memkind")
-    (version "1.10.1")
+    (version "1.11.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1057,7 +1182,7 @@ that support this feature).")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "11iz887f3cp5pzf1bzm644wzab8gkbhz3b7x1w6pcps71yd94ylj"))))
+                "0w5hws12l167mbr4n6a6fl0mhf8mci61fsn55lh2cxz33f7q8n2x"))))
     (build-system gnu-build-system)
     (inputs
      `(;; memkind patched jemalloc to add je_arenalookupx,
@@ -1070,7 +1195,10 @@ that support this feature).")
        ("automake" ,automake)
        ("libtool" ,libtool)))
     (arguments
-     `(#:tests? #f ; Tests require a NUMA-enabled system.
+     `(#:configure-flags
+       (list (string-append "--docdir=" (assoc-ref %outputs "out")
+                            "/share/doc/" ,name "-" ,version))
+       #:tests? #f ; Tests require a NUMA-enabled system.
        #:phases
        (modify-phases %standard-phases
          (add-before 'build 'autogen-jemalloc