gnu: libdrm: Switch to meson-build-system.
[jackhill/guix/guix.git] / gnu / packages / disk.scm
index 2158da6..006a381 100644 (file)
@@ -2,7 +2,7 @@
 ;;; 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 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
@@ -12,7 +12,7 @@
 ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
-;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages c)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages cryptsetup)
-  #:use-module (gnu packages databases)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages elf)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
@@ -54,7 +55,9 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages vim)
   #:use-module (gnu packages w3m)
@@ -63,6 +66,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
+  #:use-module (guix build-system scons)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
@@ -76,6 +80,7 @@
               (method url-fetch)
               (uri (string-append "mirror://gnu/parted/parted-"
                                   version ".tar.xz"))
+              (patches (search-patches "parted-glibc-compat.patch"))
               (sha256
                (base32
                 "1r3qpg3bhz37mgvp9chsaa3k0csby3vayfvz8ggsqz194af5i2w5"))))
@@ -195,15 +200,14 @@ scheme.")
 (define-public ddrescue
   (package
     (name "ddrescue")
-    (version "1.23")
+    (version "1.24")
     (source
      (origin
       (method url-fetch)
       (uri (string-append "mirror://gnu/ddrescue/ddrescue-"
                           version ".tar.lz"))
       (sha256
-       (base32
-        "13cd6c0x91zq10vdlyl6r5rib47bmsn5sshmkin3igwj8pa2vbm9"))))
+       (base32 "11qh0bbzf00mfb4yq35gnv5m260k4d7q9ixklry6bqvhvvp3ypab"))))
     (build-system gnu-build-system)
     (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html")
     (synopsis "Data recovery utility")
@@ -336,14 +340,14 @@ and can dramatically shorten the lifespan of the drive if left unchecked.")
 (define-public gparted
   (package
     (name "gparted")
-    (version "0.32.0")
+    (version "0.33.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/gparted/gparted/gparted-"
                            version "/gparted-" version ".tar.gz"))
        (sha256
-        (base32 "1fjp4c8jc0kjbbih1x1vs9v40d9lncma642kflnmy0bixxnvh7df"))))
+        (base32 "1ml1ky3s75lbxr91p608q3prsdh9x899mw7nbgk252pqhg4vh8sh"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ; tests require a network connection
@@ -474,16 +478,16 @@ a card with a smaller capacity than stated.")
 (define-public duperemove
   (package
     (name "duperemove")
-    (version "0.11")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append
-                    "https://github.com/markfasheh/duperemove/archive/v"
-                    version ".tar.gz"))
-              (sha256
-               (base32
-                "0rjmmh42yqw9a5j6sp31cqwxk3s97dsi4xz0wpxpllj7bsp3aiw5"))
-              (file-name (string-append name "-" version ".tar.gz"))))
+    (version "0.11.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/markfasheh/duperemove.git")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "1scz76pvpljvrpfn176125xwaqwyy4pirlm11sc9spb2hyzknw2z"))
+       (file-name (git-file-name name version))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -605,7 +609,7 @@ passphrases.")
 (define-public ndctl
   (package
     (name "ndctl")
-    (version "63")
+    (version "64.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -614,7 +618,7 @@ passphrases.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "060nsza8xic769bxj3pvl70a9885bwrc0myw16l095i3z6w7yzwq"))))
+                "1la82fqbdwjkw6il498nkdfgqc4aszv481xf2p9p07jfvankx24v"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("asciidoc" ,asciidoc)
@@ -631,6 +635,7 @@ passphrases.")
     (inputs
      `(("eudev" ,eudev)
        ("json-c" ,json-c)
+       ("keyutils" ,keyutils)
        ("kmod" ,kmod)
        ("util-linux" ,util-linux)))
     (arguments
@@ -705,7 +710,7 @@ to create devices with respective mappings for the ATARAID sets discovered.")
 (define-public libblockdev
   (package
     (name "libblockdev")
-    (version "2.20")
+    (version "2.21")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/storaged-project/"
@@ -713,7 +718,7 @@ to create devices with respective mappings for the ATARAID sets discovered.")
                                   version "-1/libblockdev-" version ".tar.gz"))
               (sha256
                (base32
-                "092snk5jyv48na4d46v1ckiy859zwpb3r0ivnxv3km5vzsp76y7q"))))
+                "02p13l4194j0vyd2zs7bb9dmyclcpqq8l3qv9289vjfbsvq2awii"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -747,3 +752,71 @@ technology (like LVM, Btrfs, MD RAID, Swap...) is implemented in a separate
 plugin, possibly with multiple implementations (e.g. using LVM CLI or the new
 LVM D-Bus API).")
     (license license:lgpl2.1+)))
+
+(define-public rmlint
+  (package
+    (name "rmlint")
+    (version "2.8.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/sahib/rmlint")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1gc7gbnh0qg1kl151cv1ld87vhpm1v3pnkn7prhscdcc21jrg8nz"))))
+    (build-system scons-build-system)
+    (arguments
+     `(#:scons ,scons-python2
+       #:scons-flags (list (string-append "--prefix=" %output)
+                           (string-append "--actual-prefix=" %output))
+       #:tests? #f                      ; No tests?
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'scons-propagate-environment
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; TODO: `rmlint --gui` fails with
+             ;; "Failed to load shredder: No module named 'shredder'".
+             ;; The GUI might also need extra dependencies, such as
+             ;; python-gobject, python-cairo, dconf, librsvg, gtksourceview3.
+             (substitute* "lib/cmdline.c"
+               (("const char \\*commands\\[\\] = \\{\"python3\", \"python\", NULL\\};")
+                (string-append
+                 "const char *commands[] = {\""
+                 (assoc-ref inputs "python") "/bin/python"
+                 "\", \"python\", NULL};")))
+             ;; By design, SCons does not, by default, propagate
+             ;; environment variables to subprocesses.  See:
+             ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
+             ;; Here, we modify the SConstruct file to arrange for
+             ;; environment variables to be propagated.
+             (substitute* "SConstruct"
+               (("^env = Environment\\(.*\\)" all)
+                (string-append
+                 all
+                 "\nenv['ENV']=os.environ"))))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("glib:bin" ,glib "bin")
+       ("python-sphinx" ,python-sphinx)))
+    (inputs
+     `(("python" ,python-wrapper)
+       ("glib" ,glib)
+       ("libelf" ,libelf)
+       ("elfutils" ,elfutils)
+       ("json-glib" ,json-glib)
+       ("libblkid" ,util-linux)))
+    (home-page "https://rmlint.rtfd.org")
+    (synopsis "Remove duplicates and other lint from the filesystem")
+    (description "@command{rmlint} finds space waste and other broken things
+on your filesystem and offers to remove it.  @command{rmlint} can find:
+
+@itemize
+@item duplicate files and duplicate directories,
+@item non-stripped binaries (i.e. binaries with debug symbols),
+@item broken symbolic links,
+@item empty files and directories,
+@item files with broken user and/or group ID.
+@end itemize\n")
+    (license license:gpl3+)))